import operator as op def ncr(n, r): r = min(r, n-r) if r == 0: return 1 numer = reduce(op.mul, xrange(n, n-r, -1)) denom = reduce(op.mul, xrange(1, r+1)) return numer//denom i = input(); assert i >= 0, "error message" assert i <= 1000000000, "error message" if i <= 31: print ncr(31, i), (i * ncr(31, i) / 31) * (2**31-1); else: print 0, 0