#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
for(int i = 1;i<=(40-3)/8;i++)
{
int j = (40-i*8)/3;
if(i*8 + j*3 == 40)
{
cout<<i<<" "<<j<<endl;
}
}
return 0;
}
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int x,a,b;
cin>>x>>a>>b;
int cnt = 0;
for(int i = 1;i<=(x-b)/a;i++)
{
int j = (x-i*a)/b;
if(i*i + j*b == x)
{
cout<<i<<" ";
cnt++;
}
}
return 0;
}
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int n,a,b;
cin>>n>>a>>b;
for(int i = 2;i<=(n-2*b)/a;i++)
{
int j = (n-i*a)/b;
if(i*i + j*b ==n && i%2 == 0 && j%2 == 0)
{
cout<<i<<" "<<j<<endl;
}
}
return 0;
}
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
for(int i = 1;i<=16;i++)
{
int a = 17-i;
int b = 25+i;
if(b == a*2)
{
cout<<i<<endl;
}
}
return 0;
}
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int n,x,y;
cin>>n>>x>>y;
int a,b;
for(int i = 1;i<(x-b)/a;i++)
{
int j = (x-i*a)/b;
if(i*b+j*a == n&&j+i>50)
{
cout<<i<<" "<<j<<endl;
}
}
return 0;
}
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int x,a,b;
cin>>x>>a>>b;
for(int i = 1;i<=(x-b)/a;i++)
{
{
int j = (x-i*a)/b;
if(i*a+j*b == x && i+j>=5 && i>j)
{
cout<<i<<" "<<j<<endl;
}
}
}
return 0;
}
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int n,x,y;
cin>>n>>x>>y;
int a,b;
for(int i = 1;i<=(n-y)/x;i++)
{
int j = (n - i*x)/y;
if(i*x+j*y == n)
{
a = i;
b = j;
}
}
cout<<a<<" "<<b;
return 0;
}