#include<bits/stdc++.h>
using namespace std;
bool isConsecutiveOdd(int a, int b, int c, int d) {
int nums[4] = {a, b, c, d};
sort(nums, nums + 4);
if (nums[0] % 2 == 1 && nums[1] == nums[0] + 2 && nums[2] == nums[1] + 2 && nums[3] == nums[2] + 2) {
return true;
}
return false;
}
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
if (isConsecutiveOdd(a, b, c, d)) {
int nums[4] = {a, b, c, d};
sort(nums, nums + 4);
cout << nums[0] << "+2=" << nums[1] << endl;
cout << nums[1] << "+2=" << nums[2] << endl;
cout << nums[2] << "+2=" << nums[3] << endl;
} else {
int nums[4] = {a, b, c, d};
sort(nums, nums + 4, greater<int>());
cout << nums[0] << " " << nums[1] << " " << nums[2] << " " << nums[3] << endl;
}
int main() {
return 0;
}
/**************************************************************
Problem: 1046
User: linmiaoling
Language: C++
Result: Compile Error
****************************************************************/