#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

struct fig{
	int n;
	string str;
};
fig num[4];

bool inp(){
	cin>>num[0].n>>num[1].n>>num[2].n>>num[3].n;
	char buf[100];
	sprintf(buf,"%d",num[0].n);
	num[0].str=buf;
	sprintf(buf,"%d",num[1].n);
	num[1].str=buf;
	sprintf(buf,"%d",num[2].n);
	num[2].str=buf;
	sprintf(buf,"%d",num[3].n);
	num[3].str=buf;
	return num[0].n!=0;
}

bool f(fig nu[],int n){
	/*int y;
	for(y=0;y<n;y++){
		cout<<nu[y].n<<endl<<nu[y].str<<endl;
	}
	cout<<endl;
	*/if(n==1){
		if(nu[0].n==10){
			cout<<nu[0].str<<endl;
			return true;
		}else{
			return false;
		}
	}
	int i,j;
	for(i=0;i<n;i++){
		for(j=0;j<n;j++){
			if(i==j)continue;
			fig next[4];
			int k,t=1;
			next[0].n=nu[i].n+nu[j].n;
			next[0].str="("+nu[i].str+" + "+nu[j].str+")";
			for(k=0;k<n;k++){
				if(k!=i&&k!=j){
					next[t++]=nu[k];
				}
			}
			if(f(next,n-1))return true;
			t=1;
			next[0].n=nu[i].n-nu[j].n;
			next[0].str="("+nu[i].str+" - "+nu[j].str+")";
			for(k=0;k<n;k++){
				if(k!=i&&k!=j){
					next[t++]=nu[k];
				}
			}
			if(f(next,n-1))return true;
			t=1;
			next[0].n=nu[j].n-nu[i].n;
			next[0].str="("+nu[j].str+" - "+nu[i].str+")";
			for(k=0;k<n;k++){
				if(k!=i&&k!=j){
					next[t++]=nu[k];
				}
			}
			if(f(next,n-1))return true;
			t=1;
			next[0].n=nu[i].n*nu[j].n;
			next[0].str="("+nu[i].str+" * "+nu[j].str+")";
			for(k=0;k<n;k++){
				if(k!=i&&k!=j){
					next[t++]=nu[k];
				}
			}
			if(f(next,n-1))return true;
			
		}
	}
	return false;
}

int main() {
	while(inp()){
		if(!f(num,4))cout<<0<<endl;
	}
	return 0;
}