#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
#define lol(i,n) for(int i=0;i<n;i++)
#define mod 1000000007
typedef long long ll;
using namespace std;
int f(int a,int b,int x){return (x?(x-1?a*b:a-b):a+b);}
int r[4];
int main(){
	while(cin>>r[0]>>r[1]>>r[2]>>r[3]&&r[0]){
		lol(q,99){string z="+-*";
			lol(i,3)lol(j,3)lol(k,3){
				if(f(f(r[0],r[1],i),f(r[2],r[3],k),j)==10){
					cout<<"("<<r[0]<<z[i]<<r[1]<<")"<<z[j]<<"("<<r[2]<<z[k]<<r[3]<<")\n";
					goto l;
				}
				if(f(f(f(r[0],r[1],i),r[2],j),r[3],k)==10){
					cout<<"(("<<r[0]<<z[i]<<r[1]<<")"<<z[j]<<r[2]<<")"<<z[k]<<r[3]<<"\n";
					goto l;
				}
			}
			if(q%6==5)swap(r[0],r[1]);
			else if(q%2==1)swap(r[1],r[2]);
			else swap(r[2],r[3]);
		}cout<<"0"<<endl;
		l:;
	}
	return 0;
}