import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long x = scan.nextLong(); scan.close(); if(x > 31) { System.out.println(0 + " " + 0); }else { long c = comb(31, (int)x); long sum = ((long)Math.pow(2, 31) - 1) * comb(30, (int)x-1); System.out.println(c + " " + sum); } } static long comb(int n, int k) { if(n < k) { int t = n; n = k; k = t; } if(k == 0) { return 1; }else if(n == k) { return 1; }else { return comb(n - 1, k - 1) * n / k; } } }