#!/usr/bin/env python # -*- coding: utf-8 -*- import itertools c = lambda a,b:len(list(itertools.combinations(range(1,a+1),b))) x = int(input()) print(c(31, x), ((1<<31) - 1) * c(30, x - 1))