#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
using namespace std;
typedef vector<int> vint;
#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
char aaa[3]={'+','-','*'};
string temp[]={"(0 0) (0 0)","((0 0) 0) 0","0 (0 (0 0))","(0 (0 0)) 0"};
vint bbb[4];
vint ccc[4];

string calc(string in,int c){
	stringstream ss1;
	ss1<<in;
	int a,b;
	char t;
	ss1>>a>>t>>b;
	if(c==1) a=a+b;
	if(c==2) a=a-b;
	if(c==3) a=a*b;
	stringstream ss2;
	ss2<<a;
	string ans;
	ss2>>ans;
	if(ans[0]=='-') ans="43"; 
	return ans;
}
string foo(string s){
	int pos1=-1,pos2=-1;
	rep(i,s.size()){
		if(s[i]=='('){
			pos1=i;
		}
		else if(s[i]==')'){
			pos2=i;
			break;
		}
	}
	if(pos1!=-1) s=foo(s.substr(0,pos1)+foo(s.substr(pos1+1,pos2-pos1-1))+s.substr(pos2+1));
	int update=1;
	while(update){
		update=0;
		rep(i,s.size()){
			if(s[i]=='*'){
				update=1;
				int x=i-1,y=i+1;
				while(s[x]>='0'&&s[x]<='9'){
					x--;
					if(x==-1) break;
				}
				while(s[y]>='0'&&s[y]<='0'){
					y++;
					if(y==s.size()) break;
				}
				s=s.substr(0,x+1)+calc(s.substr(x+1,y-1)+s.substr(y-1),3);
				break;
			}
		}
	}
	update=1;
	while(update){
		update=0;
		rep(i,s.size()){
			if(s[i]=='+'||s[i]=='-'){
				update=1;
				int x=i-1,y=i+1;
				while(s[x]>='0'&&s[x]<='9'){
					x--;
					if(x==-1) break;
				}
				while(s[y]>='0'&&s[y]<='0'){
					y++;
					if(y==s.size()) break;
				}
				int ddd=2;
				if(s[i]=='+') ddd=1;
				s=s.substr(0,x+1)+calc(s.substr(x+1),ddd);
				break;
			}
		}
	}
	return s;
}
void mainmain(){
	int a,b,c,d;
	rep(i,3){
		rep(j,temp[i].size()){
			if(temp[i][j]=='0'){
				bbb[i].PB(j);
			}
			if(temp[i][j]==' '){
				ccc[i].PB(j);
			}
		}
	}
	int aa[4];
	vint v(4);
	vint tt(4);
	while(cin>>v[0]>>v[1]>>v[2]>>v[3],v[0]){
		sort(ALL(v));
		bool f=false;
		do{
			rep(i,3){
				string tmp=temp[i];
				rep(j,4){
					tmp[bbb[i][j]]+=v[j];
				}
				rep(j,3){
					tmp[ccc[i][0]]=aaa[j];
					rep(k,3){
						tmp[ccc[i][1]]=aaa[k];
						rep(l,3){
							tmp[ccc[i][2]]=aaa[l];
							if("10"==foo(tmp)){
								cout<<tmp<<endl;
								f=true;
								break;
							}
						}
						if(f) break;
					}
					if(f) break;
				}
				if(f) break;
			}
			if(f) break;
		}while(next_permutation(ALL(v)));
		if(!f) cout<<0<<endl;
	}
}
main() try{
    mainmain();
}
catch(...){
}