#include using namespace std; using ll = long long; ll C(int m, int n){ ll now = 1; for(int i = 0; i < n; i++){ now = (now*(m-i))/(i+1); } return now; } int main(){ int x; cin >> x; if(x>31){ cout << 0 << " " << 0 << endl; return 0; }else{ ll ans1 = 0; if(x>0)ans1 = C(31, x); else ans1 = 1; ll ans2 = 0; for(int i = 0; i <= 30; i++) ans2 += pow(2,i); if(x>0)ans2 *= C(30, x-1); else ans2 = 0; cout << ans1 << " " << ans2 << endl; return 0; } }