t=1;1.upto(x=gets.to_i){|i|t=t*(32-i)/i};puts x<1?'1 0':x>31?'0 0':[t,t*x/31*(2**31-1)]*' '