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