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