#include<bits/stdc++.h>
using namespace std;
ifstream fi("DQPS.inp");
ofstream fo("DQPS.out");
int64_t p=1,s=0;
void ps(int x,int i){
   if(i<=x){
      p=p*int64_t(i*2 +1);
      s=s+int64_t(i*2 +1);
      ps(x,i+1);
   }
   else fo<<p<<endl<<s;
}
int main(){
  int n;
  fi>>n;
  ps(n,0);
}
