def c(a,b,s)(1..b).each{|i|s=s*(a-i)/i};s;end x=gets.to_i puts x<1?'1 0':x<99?[c(32,x,1),c(31,x-1,2**31-1)]*' ':'0 0'