import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1); String s = r.readLine(); int x = Integer.parseInt(s); long[][] z = new long[100][100]; long[][] c = new long[100][100]; if(x == 0) { System.out.println("1 0"); return; } if(x > 31) { System.out.println("0 0"); return; } for(int i = 1; i <= 31; i++) { z[1][i] = (1 << i) - 1; c[1][i] = i; //System.out.println(z[1][i]); } for(int i = 2; i <= x; i++) { for(int j = 1; j <= 31; j++) { for(int k = i; k <= j; k++) { z[i][j] += c[i - 1][k - 1] * (1 << (k - 1)) + z[i - 1][k - 1]; c[i][j] += c[i - 1][k - 1]; } } } System.out.printf("%d %d\n", c[x][31], z[x][31]); } }