#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,d;
cin>>a>>b>>c>>d;
int e=b-a;
int r=b/a;
if(a+c==b*2)
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<d+e;
else if(a*c==b^2)
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<d*r;
return 0;
}