#include <bits/stdc++.h>
using namespace std;
long long  a[1000000],b[1000000],m,c,x,e,t,dem=0,i1,i2,d2=0,n=0,d=1,k,h,g,hahihi=0;
void input()
{
    freopen("DQPS.inp","r",stdin);
    cin>>n;
}
int solve1(int i1)
{
    if (i1<n+1)
    {
        return (2*i1+1)*solve1(i1+1);
    }
    return 1;
}
int solve2(int i2)
{
    if (i2<n+1)
    {
        return (2*i2+1)+solve2(i2+1);
    }
    return 0;
}
void output()
{
    freopen("DQPS.out","w",stdout);
    cout<<k<<endl<<m;
}
int main()
{
    ios_base::sync_with_stdio(false);
    input();
    k=solve1(i1);
    m=solve2(i2);
    output();
}

