#!/usr/bin/env python # -*- coding:utf-8 -*- import math x = int(input()) if x > 31: m = 0 s = 0 else: m = int(math.factorial(31)/(math.factorial(x)*math.factorial(31 - x))) s = int(m * (2**31 - 1) * x / 31) print(m,s)