#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,tot=0;
cin>>n;
for(int x=100,k=1;x>=1;x--,k++)
{
tot = 0;
for(int i=1;i<=52;i++)
{
for(int j=0;j<7;j++)
{
tot += x+j*k;
if(tot==n){
cout<<x<<endl;
cout<<k<<endl;
return 0;
}
}
}
}
return 0;
}
求助大佬 P4956