sicily 1793. Numbers
#include<iostream>
#include<cmath>
using namespace std;
int gcd(int a,int b)
{
int r;
while(b>0)
{
r=a%b;
a=b;b=r;
}
return a;
}
int main()
{
int a,b,c;
while(cin>>a>>b&&a)
{
c=b/a;
for(int i=sqrt(double(c));i>=1;--i)
if(c%i==0&&gcd(c/i,i)==1)
{
cout<<a*(c/i-i)<<" "<<a*i<<" "<<a*c/i<<endl;
break;
}
}
return 0;
}