for N in xrange(1,int(raw_input())+1):print["{0}: {1} {2}".format(N,x,sum(i*(i+1)/2for i in xrange(1,x+1)))for x in[int(raw_input())]][0]