#include <iostream>
#include <algorithm>
using namespace std;

int a,b,c,d;
char op[3] = {'+','-','*'};

int calc(int x,int y, char o) {
  if(o == '+') {
    return x+y;
  }
  if(o == '-') {
    return x-y;
  }
  if(o == '*') {
    return x*y;
  }
}

void solve() {
  int v[4];
  v[0] = a;
  v[1] = b;
  v[2] = c;
  v[3] = d;

  do {
    for(int i=0;i<3;i++) {
      for(int j=0;j<3;j++) {
        for(int k=0;k<3;k++) {
          if(calc(calc(calc(v[0],v[1],op[i]),v[2],op[j]),v[3],op[k]) == 10) { //((a b)c)d
            cout << "((" << v[0] << " " << op[i] << " " << v[1] << ")" << " " << op[j] << " " << v[2] << ") " << op[k] << " " << v[3] << endl;
            return;
          }
          if(calc(calc(v[0],v[1],op[i]),calc(v[2],v[3],op[j]),op[k]) == 10) { //(a b)(c d)
            cout << "(" << v[0] << " " << op[i] << " " << v[1] << ") "<< op[k] << " (" << v[2] << " " << op[j] << " " << v[3] << ")" << endl;
            return;
          }
          if(calc(calc(v[0],calc(v[1],v[2],op[j]),op[i]),v[3],op[k]) == 10) { //(a (b c))d
            cout << "(" << v[0] << " " << op[i] << " (" << v[1] << " " << op[j] << " " << v[2] << ")) " << op[k] << " " << v[3] << endl;
            return;
          }
        }
      }
    }
  }while(next_permutation (v,v+4));

  cout << "0" << endl;
}

int main() {
  while(cin >> a >> b >> c >> d) {
    if(a==0||b==0||c==0||d==0) break;
    solve();
  }
}