#include <iostream>
#include <string>
#include <cmath> 
#include <iomanip>
using namespace std;

#define MAX 100
#define C 2147483647
long int row[MAX];

int comb(int n, int r) {
    row[0] = 1;
    for (int i=1; i<=n; i++) {
        for (int j=i; j>0; j--) {
            row[j] += row[j-1];
        }
    }
    return row[r];
}

int main() {
    unsigned int n;
    cin >> n;
    if ( n > 31 ){
        cout << 0 << " " << 0 << endl;
    } else {
        long int x;
        x = comb(31, n);
        cout << x << " " << x*n/31*C << endl;
    }
}