#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int n;
string s;
typedef pair<int,int> PII;
PII a[15];
#define x first
#define y second
int main(){
getline(cin,s);
char c=s.back(); //末尾字符
n=c-'0'; //转换成数字
a[0].x=1189,a[0].y=841;
for(int i=1;i<=n;i++){
a[i].x=a[i-1].y;
a[i].y=a[i-1].x/2;
}
printf("%d\n",a[n].x);
printf("%d",a[n].y);
return 0;
}