#include<iostream>
#include<array>
#include<vector>
#include<sstream>
#include<algorithm>
using namespace std;
typedef pair<int,string> is;

string to_str(int a){
  stringstream ss;
  ss<<a;
  return ss.str();
}
vector<is> hoge(const vector<is>& a,const vector<is>& b){
  vector<is> ret;
  for(is aa:a){
    for(is bb:b){
      ret.push_back(make_pair(aa.first+bb.first,
			      "("+aa.second+"+"+bb.second+")"));
      ret.push_back(make_pair(aa.first-bb.first,
			      "("+aa.second+"-"+bb.second+")"));
      ret.push_back(make_pair(aa.first*bb.first,
			      "("+aa.second+"*"+bb.second+")"));
    }
  }
  return ret;
}
is fuga(int* a){
  array<vector<is>,4> b;
  for(int i=0;i<4;i++)
    b[i].push_back(make_pair(a[i],to_str(a[i])));
  do{
    for(is c:hoge(hoge(hoge(b[0],b[1]),b[2]),b[3]))
      if(c.first==10)
	return c;
    for(is c:hoge(hoge(b[0],b[1]),hoge(b[2],b[3])))
      if(c.first==10)
	return c;
    for(is c:hoge(hoge(b[0],hoge(b[1],b[2])),b[3]))
      if(c.first==10)
	return c;
    for(is c:hoge(b[0],hoge(hoge(b[1],b[2]),b[3])))
      if(c.first==10)
	return c;
    for(is c:hoge(b[0],hoge(b[1],hoge(b[2],b[3]))))
      if(c.first==10)
	return c;
  }while(next_permutation(b.begin(),b.end()));
  return make_pair(0,"0");
}

int main(){
  int a[4]{0};
  while(cin>>a[0]>>a[1]>>a[2]>>a[3]){
    if(!(a[0]|a[1]|a[2]|a[3])) return 0;
    is ret=fuga(a);
    cout<<ret.second<<endl;
  }
}