#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int num(int x, int y, char c);
int main(){
  vector<int> s(4);
  while(cin >>s[0]>>s[1]>>s[2]>>s[3]){
    bool f = false;
    vector<char> one(3);
    vector<char> two(3);
    vector<char> thr(3);
    one[0] = two[0] = thr[0] = '+';
    one[1] = two[1] = thr[1] = '-';
    one[2] = two[2] = thr[2] = '*';
    sort(s.begin(),s.end());
    sort(one.begin(),one.end());
    sort(two.begin(),two.end());
    sort(thr.begin(),thr.end());
    do{
      do{
	do{
	  do{
	    if(num(num(num(s[0],s[1],one[0]),s[2],two[0]),s[3],thr[0]) == 10){
	      cout <<"((("<<s[0]<<" "<<one[0]<<" "<<s[1]<<")"<<" "<<two[0]<<" "<<s[2]<<")"<<" "<<thr[0]<<" "<<s[3]<<")";
	      f = true;goto end;
	    }
	    if(num(num(s[0],s[1],one[0]),num(s[2],s[3],thr[0]),two[0]) == 10){
	      cout <<"(("<<s[0]<<" "<<one[0]<<" "<<s[1]<<")"<<" "<<two[0]<<" "<<"("<<s[2]<<" "<<thr[0]<<" "<<s[3]<<"))";
	      f = true;goto end;
	    }
	    if(num(s[0],num(s[1],num(s[2],s[3],thr[0]),two[0]),one[0]) == 10){
	      cout <<"("<<s[0]<<" "<<one[0]<<" "<<"("<<s[1]<<" "<<two[0]<<" "<<"("<<s[2]<<" "<<thr[0]<<" "<<s[3]<<")))";
	      f = true;goto end;
	    }
	    if(num(num(s[0],num(s[1],s[2],two[0]),one[0]),s[3],thr[0]) == 10){
	      cout <<"(("<<s[0]<<" "<<one[0]<<" "<<"("<<s[1]<<" "<<two[0]<<" "<<s[2]<<"))"<<" "<<thr[0]<<" "<<s[3]<<")";
	      f = true;goto end;
	    }
	    if(num(s[0],num(num(s[1],s[2],two[0]),s[3],thr[0]),one[0]) == 10){
	      cout <<"("<<s[0]<<" "<<one[0]<<" "<<"(("<<s[1]<<" "<<two[0]<<" "<<s[2]<<")"<<" "<<thr[0]<<" "<<s[3]<<"))";
	      f = true;goto end;
	    }
	  }while(next_permutation(thr.begin(),thr.end()));
	}while(next_permutation(two.begin(),two.end()));
      }while(next_permutation(one.begin(),one.end()));
    }while(next_permutation(s.begin(),s.end()));
  end:;
    if(f){cout<<endl;}
    else{cout <<"0"<<endl;}
  }
  return 0;
}
int num(int x, int y, char c){
  if(c == '+'){return x+y;}
  if(c == '-'){return x-y;}
  return x*y;
}