#include <stdio.h>
int main(){
__int64 h[],l[];
int i,j;
int n;
while(~scanf("%d",&n)&&n!=-){
h[]=;
l[]=;
for(i=;i<=n;++i){
h[i]=h[i-]*+l[i-]*;
l[i]=h[i-]*+l[i-]*; }
printf("%I64d, %I64d\n",h[n],l[n]);
}
return ;
}
#include <stdio.h>
int main(){
__int64 h[],l[];
int i,j;
int n;
while(~scanf("%d",&n)&&n!=-){
h[]=;
l[]=;
for(i=;i<=n;++i){
h[i]=h[i-]*+l[i-]*;
l[i]=h[i-]*+l[i-]*; }
printf("%I64d, %I64d\n",h[n],l[n]);
}
return ;
}