#include<bits/stdc++.h>
using namespace std;
typedef pair<int,string> P;
vector<int> v(4);
string s="+-*";

int cl(int a,int b,int c){
  if(b == 0) return a+c;
  if(b == 1) return a-c;
  return a*c;
}

int solve(int a,int b,int c){
  if(cl(cl(cl(v[0],a,v[1]),b,v[2]),c,v[3]) == 10){
    cout << "(((" << v[0] << " " << s[a] << " " << v[1] << ") " << s[b] << " " << v[2] << ") " << s[c] << " " << v[3] << ")" << endl;
    return 1;
  }
  if(cl(cl(v[0],a,v[1]),b,cl(v[2],c,v[3])) == 10){
    cout << "((" << v[0] << " " << s[a] << " " << v[1] << ") " << s[b] << " (" << v[2] << " " << s[c] << " " << v[3] << "))" << endl; 
    return 1;
  }
  if(cl(cl(v[0],a,cl(v[1],b,v[2])),c,v[3]) == 10){
    cout << "((" << v[0] << " " << s[a] << " (" << v[1] << " " << s[b] << " " << v[2] << ")) " << s[c] << " " << v[3] << ")" << endl; 
    return 1;
  }
  return 0;
}

int judge(){
  for(int i=0;i<3;i++){
    for(int j=0;j<3;j++){
      for(int k=0;k<3;k++){
	if(solve(i,j,k)) {
	  return 1;
	}
      }
    }
  }
  return 0;
}

int main(){
  while(1){
    v.clear();
    int sum = 0;
    for(int i=0;i<4;i++){
      int a; cin >> a;
      sum += a;
      v.push_back(a);
    }
    if(sum == 0) return 0;
    int flg = 1;
    sort(v.begin(),v.end());
    do{
      if(judge()){
	flg = 0;
	break;
      }
    } while(next_permutation(v.begin(),v.end()));
    if(flg) cout << "0" << endl;
  }
}