import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); if (x > 31) { System.out.println("0 0"); return; } if (x == 0) { System.out.println("1 0"); return; } 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]; } } } long count = comb[31][x]; long sum = 0; for (int i = 0; i < 31; i++) { sum += (1L << i) * comb[30][x - 1]; } System.out.println(count + " " + sum); } }