#include <cstdio>
#include <iostream>
#include <algorithm>
#include <queue>
#include <string>
#include <sstream>
using namespace std;
string str;
int pos;

int exp(void);
int term(void);
int factor(void);

class Point{
public:
  int x,i;
  string st;
  Point(int x = 0,int i = 0,string st = ""):x(x),i(i),st(st){}
  bool operator < (const Point &s) const{ return x < s.x; }
};

int main(){
  int i,j,t;
  string ans;
  while(1){
    Point p[4],pp[4],sp[4];
    queue <Point> Q;
    for(i=0;i<4;i++){
      cin >> p[i].x;
      p[i].i = i;
    }
    if(p[0].x == 0 && p[1].x == 0 && p[2].x == 0 && p[3].x == 0) break;
    ans = "0";

    for(int r=0;r<6;r++){
      sp[0] = p[0];
      if(r == 0 || r == 1){
	sp[1] = p[1];
	if(r == 0){
	  sp[2] = p[2];
	  sp[3] = p[3];
	}
	else{
	  sp[2] = p[3];
	  sp[3] = p[2];
	}
      }
      if(r == 2 || r == 3){
	sp[1] = p[2];
	if(r == 2){
	  sp[2] = p[1];
	  sp[3] = p[3];
	}
	else{
	  sp[2] = p[3];
	  sp[3] = p[1];
	}
      }
      if(r == 4 || r == 5){
	sp[1] = p[3];
	if(r == 4){
	  sp[2] = p[2];
	  sp[3] = p[1];
	}
	else{
	  sp[2] = p[1];
	  sp[3] = p[2];
	}
      }

      for(int s=0;s<4;s++){
	for(i=0;i<4;i++){
	  pp[i] = sp[(i+s)%4];
	  pp[i].i = i;
	}
	for(t=0;t<10;t++){
	  Q.push(pp[0]);
	  while(!Q.empty()){
	    Point u,v;
	    u = Q.front();
	    Q.pop();
	    
	    if((t == 4 || t == 6 || t == 7) && u.i == 0) u.st += "(";
	    if((t == 5 || t == 8 || t == 9) && u.i == 1) u.st += "(";
	    if((t == 1 || t == 6) && u.i == 0) u.st += "(";
	    if((t == 2 || t == 7 || t == 8) && u.i == 1) u.st += "(";
	    if((t == 3 || t == 9) && u.i == 2) u.st += "(";
	    
	    ostringstream oss;
	    oss << pp[u.i].x;
	    u.st += oss.str();
	    
	    if((t == 4 || t == 6 || t == 7) && u.i == 2) u.st += ")";
	    if((t == 5 || t == 8 || t == 9) && u.i == 3) u.st += ")";
	    if((t == 1 || t == 6) && u.i == 1) u.st += ")";
	    if((t == 2 || t == 7 || t == 8) && u.i == 2) u.st += ")";
	    if((t == 3 || t == 9) && u.i == 3) u.st += ")";
	    
	    if(u.i < 3){
	      for(i=0;i<3;i++){
		v = u;
		if(i == 0) v.st += "+";
		else if(i == 1) v.st += "-";
		else if(i == 2) v.st += "*";
		v.i++;
		Q.push(v);
	      }
	    }
	    else if(u.i == 3){
	      str = u.st;
	      pos = 0;
	      int ans2 = exp();
	      //cout << str << " " << ans2 << endl;
	      if(ans2 == 10) ans = u.st;
	    }
	  }
	  if(ans != "0") break;
	}
	if(ans != "0") break;
      }
      if(ans != "0") break;
    }

    if(ans != "0"){
      ans.insert(0,"(");
      ans.insert(ans.size(),")");
    }
     for(i=0;i<ans.size();i++){
       if(ans[i] == '+' || ans[i] == '-' || ans[i] == '*'){
	ans.insert(i," ");
	ans.insert(i+2," ");
	i++;
	}
     }

    cout << ans << endl;
  }
  return 0;
}

int exp(void){
  int x = term();
  while(str[pos] == '+' || str[pos] == '-'){
    char op = str[pos++];
    if(op == '+') x += term();
    else if(op == '-') x -= term();
  }
  return x;
}

int term(void){
  int x = factor();
  while(str[pos] == '*' || str[pos] == '/'){
    char op = str[pos++];
    if(op == '*') x *= factor();
    else if(op == '/') x /= factor();
  }
  return x;
}

int factor(void){
  int x=0,c;
  if(str[pos] == '('){
    pos++;
    x = exp();
    pos++;
  }
  else{
    while(str[pos] >= '0' && str[pos] <= '9'){
      x *= 10;
      x += str[pos++] - '0';
    }
  }
  return x;
}