#include <bits/stdc++.h>
#define MAX 100
using namespace std;

int main(){
	int dp[MAX];
	int n;
	cin>>n;
	dp[0]=1;
	for(int i = 1; i <= n; i++)
		dp[i] = dp[i-1] * i;
	
	int y1 = 0,y2 = 0;
	for(int i = 1; i <= n; i+=2){
		y1 += dp[i];
	}
	for(int i = 2; i <= n; i+=2){
		y2 += dp[i];
	}
	cout<<y1<<" "<<y2;
}