from math import factorial as f;n=input();print f(31)/f(n)/f(31-n)if 0<=n<32 else 0,f(30)/f(n-1)/f(31-n)*(2**31-1)if 0