#include using namespace std; int main() { long long C[100][100]; C[0][0] = 1; for (int i = 0; i < 99; i++) { for (int j = 0; j < 99; j++) { C[i + 1][j] += C[i][j]; C[i + 1][j + 1] += C[i][j]; } } int x; cin >> x; long long way = C[31][x]; long long sum = x > 0 ? C[30][x - 1] * INT_MAX : 0; cout << way << " " << sum << endl; }