#include<iostream>
using namespace std;
int jiecheng(int s){
	if(s==1){
		return s;
	}
	else
		return s*jiecheng(s-1);
}
int main(){
	int n;
	while(scanf("%d",&n)!=EOF){
		int y1=0,y2=0,i;
		for(i=1;i<=n;i++)
		{
			if(i%2==0)
			{
				y2+=jiecheng(i);
			}
			else
				y1+=jiecheng(i);
		}
		printf("%d %d\n",y1,y2);
	}
}