#include <bits/stdc++.h>
using namespace std;
int x,k,s,w=52;
int main(){
cin>>s;
for(int i=1;i<=s;i++){
for(int j=1;j<=s-i;j++){
if(i*w+(i+j)*w+(i+j*2)*w+(i+j*3)*w+(i+j*4)*w+(i+j*5)*w+(i+j*6)*w==s){
x=i;
k=j;
}
}
}
cout<<x<<endl<<k;
return 0;
}
21分(QAQ)求助