#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
 
using namespace std;
 
#define pb(n)	push_back(n)
#define mp(n,m) make_pair(n,m)
#define fi 	first
#define se 	second
#define all(r) r.begin(),r.end()

#define rep(i,n) for(int i=0; i<(n); i++)
#define repc(i,a,b) for(int i=(a); i<=(b); i++)

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
 
const int IMAX=((1<<30)-1)*2+1;
const double EPS=1e-10;
//int mod=1000000007;


vi v(4);
vi ea;
int f=0;

int fun(int a,int b,int en){
	if(en==0)return a+b;
	if(en==1)return a-b;
	if(en==2)return a*b;
	return -1;
}

bool calc(){//maekara
	if(f!=0)return false;
	vi e(3);
	rep(i,3){
		e[0]=i;
		rep(j,3){
			e[1]=j;
			rep(k,3){
				e[2]=k;
				if(fun(fun(fun(v[0],v[1],e[0]),v[2],e[1]),v[3],e[2])==10){
					ea=e;
					f=1;
					return true;
				}
			}
		}
	}
	return false;
}

bool calc2(){//mannaka->*
	if(f!=0)return false;
	vi e(3);
	e[1]=2;
	for(int i=0; i<2; i++){
		e[0]=i;
		for(int j=0; j<2; j++){
			e[2]=j;
			if(fun(v[0],v[1],e[0])*fun(v[2],v[3],e[2])==10){
				ea=e;
				f=2;
				return true;
			}
		}
	}
	return false;
}

bool calc3(){//saigo->*
	if(f!=0)return false;
	vi e(3);
	e[2]=2;
	for(int i=0; i<3; i++){
		e[0]=i;
		for(int j=0; j<3; j++){
			e[1]=j;
			if(fun(fun(v[0],v[1],e[0]),v[2]*v[3],e[1])==10){
				ea=e;
				f=3;
				return true;
			}
		}
	}
	return false;
}

char en(int i){
	if(i==0)return '+';
	if(i==1)return '-';
	if(i==2)return '*';
	return '?';
}

int main(){
	while(cin>>v[0]>>v[1]>>v[2]>>v[3]){
		f=0;
		if(v[0]==0&&v[1]==0&&v[2]==0&&v[3]==0)break;
		do{
			if(calc()){
				cout<<"((("<<v[0]<<" "<<en(ea[0])<<" "<<v[1]<<") "<<en(ea[1])<<" "<<v[2]<<") "<<en(ea[2])<<" "<<v[3]<<")"<<endl;
				break;
			}
			else if(calc2()||calc3()){
				cout<<"(("<<v[0]<<" "<<en(ea[0])<<" "<<v[1]<<") "<<en(ea[1])<<" ("<<v[2]<<" "<<en(ea[2])<<" "<<v[3]<<"))"<<endl;
				break;
			}
		}while(next_permutation(all(v)));
		if(f==0)cout<<f<<endl;
	}
}