import java.util.*; public class Main { public static void main (String[] args) throws Exception { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); long[][] comb = new long[32][32]; for (int i = 0; i < 32; i++) { for (int j = 0; j <= i; j++) { if (j == 0 || j == i) { comb[i][j] = 1; } else { comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j]; } } } if (x > 31) { System.out.println("0 0"); return; } else if (x == 0) { System.out.println("1 0"); } long total = 0; long base = 1; for (int i = 0; i < 31; i++) { total += base; base *= 2; } long count = comb[31][x]; long sum = total * comb[30][x - 1]; System.out.println(count + " " + sum); } }