#include<iostream>
using namespace std;
int main(){
int a,b,c,d,n;
cin>>a>>b>>c>>d;
if(a>b){
n=a;
a=b;
b=n;
}
if(b>c){
n=b;
b=c;
c=n;
}
if(c>d){
n=c;
c=d;
d=n;
}
if(a>b){
n=a;
a=b;
b=n;
}
if(b>c){
n=b;
b=c;
c=n;
}
if(a>b){
n=a;
a=b;
b=n;
}
if(a+2==b&&b+2==c&&c+2==d&&a%2!=0){
cout<<a<<"+2="<<b<<endl;
cout<<b<<"+2="<<c<<endl;
cout<<c<<"+2="<<d<<endl;
}else{
cout<<d<<" "<<c<<" "<<b<<" "<<a<<endl;
}
}
/**************************************************************
Problem: 1046
User: wengzihang
Language: C++
Result: Accepted
Time:10 ms
Memory:2072 kb
****************************************************************/