package No400番台; import java.math.BigInteger; import java.util.Scanner; public class Q420 { public static void main(String[] args) { new Q420().solver(); } void solver() { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); if (x >= 32) { System.out.println(0 + " " + 0); } else { BigInteger comb = new BigInteger("1"); for (int i = 31; i >= Math.max(31 - x, x) + 1; i--) { comb = comb.multiply(BigInteger.valueOf(i)); } for (int i = Math.min(31 - x, x); i >= 1; i--) { comb = comb.divide(BigInteger.valueOf(i)); } BigInteger sum = BigInteger.valueOf((1L << 31) - 1); sum=sum.multiply(comb.multiply(BigInteger.valueOf(x)).divide(BigInteger.valueOf(31))); System.out.println(comb + " " + sum); } } }