#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <sstream>
#include <cmath>
using namespace std;

typedef pair<int,string> pis;
#define fi first
#define se second

vector<pis> solve(vector<int> nums) {
	vector<pis> res;
	if(nums.size() == 1) {
		string s;
		stringstream sstr;
		sstr << nums[0];
		sstr >> s;
		res.push_back(pis(nums[0],s));
		return res;
	}
	for(int i = 1; i < nums.size(); i++) {
		vector<int> a(nums.begin(), nums.begin()+i);
		vector<int> b(nums.begin()+i, nums.end());
		vector<pis> aa, bb;
		aa = solve(a);
		bb = solve(b);
		for(int i = 0; i < aa.size(); i++) {
			for(int j = 0; j < bb.size(); j++) {
				res.push_back(pis(aa[i].fi + bb[j].fi, "(" + aa[i].se + "+" + bb[j].se + ")"));
				res.push_back(pis(aa[i].fi - bb[j].fi, "(" + aa[i].se + "-" + bb[j].se + ")"));
				res.push_back(pis(aa[i].fi * bb[j].fi, "(" + aa[i].se + "*" + bb[j].se + ")"));
			}
		}
	}
	return res;
}

int main() {
	while(1) {
		vector<int> a;
		a.resize(4);
		bool brk = true;
		for(int i = 0; i < 4; i++) {
			cin >> a[i];
			if(a[i] != 0) brk = false;
		}
		if(brk) break;

		sort(a.begin(), a.end());
		string res = "0";
		do {
			vector<pis> tmp;
			tmp = solve(a);
			for(int i = 0; i < tmp.size(); i++) {
				if(tmp[i].fi == 10)
					res = tmp[i].se;
			}
		} while(next_permutation(a.begin(), a.end()));
		cout << res << endl;
	}
}