#include<iostream> using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int k=1,n; long long x; cin>>n; while(1){ for(x=100000;x>=1;x-=1){ if((7*x+21*k)*52==n){ cout<<x<<endl; cout<<k;k++; return 0; } } } return 0; }