#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <ctime>
#include <iterator>
#include <bitset>
#include <numeric>
#include <list>
#include <iomanip>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#else

#endif

using namespace std;


namespace{
typedef long long LL;
typedef pair<int,int> pii;
typedef pair<LL,LL> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
    stringstream ss;
    ss << f;
    ss >> t;
}


#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
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()


#define MOD 1000000007LL
#define EPS 1e-8
static const int INF=1<<24;
char aaa[4]={'+','-','*','/'};
string temp[]={"(0 0) (0 0)","((0 0) 0) 0","0 (0 (0 0))","(0 (0 0)) 0"};
vint bbb[4];
vint ccc[4];
// int ddd[3][4]={{1,2,}}
// string s;

string calc1(string in){
	stringstream ss1;
	ss1<<in;
	int a,b;
	char t;
	ss1>>a>>t>>b;
	a=a+b;
	stringstream ss2;
	ss2<<a;
	string ans;
	ss2>>ans;
	if(ans[0]=='-') ans="1000000"; 
	return ans;
}
string calc2(string in){
	stringstream ss1;
	ss1<<in;
	int a,b;
	char t;
	ss1>>a>>t>>b;
	a=a-b;
	stringstream ss2;
	ss2<<a;
	string ans;
	ss2>>ans;
	if(ans[0]=='-') ans="1000000"; 
	return ans;
}
string calc3(string in){
	stringstream ss1;
	ss1<<in;
	int a,b;
	char t;
	ss1>>a>>t>>b;
	a=a*b;
	stringstream ss2;
	ss2<<a;
	string ans;
	ss2>>ans;
	if(ans[0]=='-') ans="1000000"; 
	return ans;
}


string foo(string s){
	// cout<<"s "<<s<<endl;
	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)+calc3(s.substr(x+1,y-1)+s.substr(y-1));
				break;
			}
		}
	}
	update=1;
	while(update){
		update=0;
		rep(i,s.size()){
			// cout<<"ssss "<<s<<endl;
			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)+calc1(s.substr(x+1,y-1)+s.substr(y-1));
				break;
			}
			else 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)+calc2(s.substr(x+1,y-1)+s.substr(y-1));
				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);
	// string aa;
	vint tt(4);
	while(cin>>v[0]>>v[1]>>v[2]>>v[3],v[0]){
		// cout<<aa<<endl;
		// rep(i,4){
			// v[i]=aa[i*2]-'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)));
		// end:
		// cout<<"hoge"<<endl;
		if(!f) cout<<0<<endl;
	}
}

void mainmain2(){
	vint tt(4);
	while(cin>>tt[0]>>tt[1]>>tt[2]>>tt[3],tt[0]){
		rep(i,4){
			cout<<tt[i]<<" ";
		}
		cout<<endl;
	}
}

}
main() try{
    mainmain();
}
catch(...){
}