def c(a,b)s=1;for i in 1..b;s=s*(a+1-i)/i;end;s;end x=gets.to_i puts x<99?[c(31,x),c(30,x-1)*0x7fffffff]*' ':'0 0'