using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Magatro { static int x = int.Parse(Console.ReadLine()); static void Main() { if (x >= 32) { Console.WriteLine("0 0"); return; } long ko = nCm(31, x); Console.Write(ko+" "); long wa; wa = 2147483647 * nCm(30, x - 1); Console.Write(wa); Console.WriteLine(); } static long kaijou(int n) { if (n == 0) { return 1; } return n * kaijou(n - 1); } static long nCm(int n, int m) { if (m == 0) return 1; if (n == 0) return 0; return n * nCm(n - 1, m - 1) / m; } }