#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;

string Add(string s1, string s2) {
    int l1 = s1.size(), l2 = s2.size();
    if (l1 < l2)swap(s1, s2);
    reverse(s1.begin(), s1.end());
    reverse(s2.begin(), s2.end());
    int car = 0;
    string s = "";
    for (int i = 0; i < s2.size(); i++) {
        int num = (s1[i] - '0') + (s2[i] - '0') + car;
        car = num / 10;
        char c = num % 10 + '0';
        s = s + c;
    }
    for (int i = s2.size(); i < s1.size(); i++) {
        int num = (s1[i] - '0') + car;
        car = num / 10;
        char c = num % 10 + '0';
        s = s + c;
    }
    if (car)s = s + "1";
    reverse(s.begin(), s.end());
    while (s[0] == '0')s.erase(0, 1);
    if (s == "")s = "0";
    return s;
}


string Mul(string s1, string s2) {
    int l1 = s1.size(), l2 = s2.size();
    if (l1 < l2)swap(s1, s2);
    reverse(s1.begin(), s1.end());
    reverse(s2.begin(), s2.end());
    int len = l1 + l2 + 3;
    int ans[len];
    memset(ans,0,sizeof(ans));
    for (int i = 0; i < s1.size(); i++) {
        for (int j = 0; j < s2.size(); j++) {
            int num = (s1[i] - '0') * (s2[j] - '0');
            ans[i + j] += num;
        }
    }
    string s = "";
    for (int i = 0; i < len; i++) {
        int num = ans[i] / 10;
        ans[i] = ans[i] % 10;
        ans[i + 1] += num;
        char c = ans[i] + '0';
        s = s + c;
    }
    reverse(s.begin(), s.end());
    while (s[0] == '0')s.erase(0, 1);
    if (s == "")s = "0";
    return s;
}

string ItoS(int x) {
    string s = "";
    while (x != 0) {
        char c = x % 10 + '0';
        s = s + c;
        x /= 10;
    }
    reverse(s.begin(), s.end());
    return s;


}

int main() {
    int n, m, p;
    string s1 = "0", s2 = "0";
    while (cin >> n) {
        if (n % 2 == 0) {
            m = n - 1;
            p = n;
        } else {
            m = n;
            p = n - 1;
        }
        string ans1 = "1", ans2 = "1";
        for (int i = 1; i <= m; i ++) {
            string str = ItoS(i);
        //    cout<<"str: "<<str<<endl;
            ans1 = Mul(ans1, str);
      //      cout<<"ans1 = "<<ans1<<endl;
            if(i%2!=0)s1 = Add(ans1, s1);
        }
        for (int i = 2; i <= p; i ++) {
            string str = ItoS(i);
            ans2 = Mul(ans2, str);
   //         cout<<ans2<<endl;
            if(i%2==0)s2 = Add(ans2, s2);
        }
        cout<<s1<<" "<<s2<<endl;

     }
    // string s1 = "901";
    // string s2 = "10";
    // string s = Mul(s1,s2);
    // string s = Add(s1,s2);
    // cout<<s<<endl;
}