#include<iostream>
#include<string>
#include<sstream>
#include<vector>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<algorithm>
#include<functional>
#include<cstdio>
#include<cstdlib>
#include<cmath>
using namespace std;

#define mind(a,b) (a>b?b:a)
#define maxd(a,b) (a>b?a:b)
#define absd(x) (x<0?-(x):x)
#define pow2(x) ((x)*(x))
#define rep(i,n) for(int i=0; i<n; ++i)
#define repr(i,n) for(int i=n-1; i>=0; --i)
#define repl(i,s,n) for(int i=s; i<=n; ++i)
#define replr(i,s,n) for(int i=n; i>=s; --i)
#define repf(i,s,n,j) for(int i=s; i<=n; i+=j)
#define repe(e,obj) for(auto e : obj)

#define SP << " " <<
#define COL << " : " <<
#define COM << ", " <<
#define ARR << " -> " <<
#define PNT(STR) cout << STR << endl
#define POS(X,Y) "(" << X << ", " << Y << ")"
#define DEB(A) " (" << #A << ") " << A
#define DEBREP(i,n,val) for(int i=0; i<n; ++i) cout << val << " "; cout << endl
#define ALL(V) (V).begin(), (V).end()
#define INF 1000000007
#define INFLL 10000000000000000007LL
#define EPS 1e-9

typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
//typedef pair<ll, ll> P;
typedef pair<P, int> PI;
typedef pair<int, P> IP;
typedef pair<P, P> PP;
typedef priority_queue<P, vector<P>, greater<P> > pvqueue;

bool used[4];
int a[4], v[4], e[3];

int tp[5][7] = {
  {0, 0, 1, 0, 0, 1, 1},
  {0, 0, 0, 1, 0, 1, 1},
  {0, 0, 0, 0, 1, 1, 1},
  {0, 0, 1, 0, 1, 0, 1},
  {0, 0, 0, 1, 1, 0, 1}
};

bool calc() {
  rep(i, 5) {
    stack<int> sta;
    int cv = 0, ce = 0;
    rep(j, 7) {
      if(tp[i][j]) {
        int e2 = sta.top(); sta.pop();
        int e1 = sta.top(); sta.pop();
        int r;
        switch(e[ce++]) {
          case 0: r = e1 + e2; break;
          case 1: r = e1 - e2; break;
          case 2: r = e1 * e2; break;
        }
        sta.push(r);
      }else {
        sta.push(v[cv++]);
      }
    }
    if(sta.top()==10) {
      stack<string> sts;
      string s;
      cv = ce = 0;
      rep(j, 7) {
        if(tp[i][j]) {
          string s2 = sts.top(); sts.pop();
          string s1 = sts.top(); sts.pop();
          string r;
          switch(e[ce++]) {
            case 0: r = s1 + "+" + s2; break;
            case 1: r = s1 + "-" + s2; break;
            case 2: r = s1 + "*" + s2; break;
          }
          r = "(" + r + ")";
          sts.push(r);
        }else {
          stringstream ss;
          ss << v[cv++];
          sts.push(ss.str());
        }
      }
      cout << sts.top() << endl;
      return true;
    }
  }
  return false;
}

bool e_dfs(int c) {
  if(c==3) {
    return calc();
  }else {
    rep(i, 3) {
      e[c] = i;
      if(e_dfs(c+1)) return true;
    }
  }
  return false;
}

bool v_dfs(int c) {
  if(c==4) {
    return e_dfs(0);
  }else {
    rep(i, 4) {
      if(!used[i]) {
        used[i] = true;
        v[c] = a[i];
        bool r = v_dfs(c+1);
        used[i] = false;
        if(r) return true;
      }
    }
  }
  return false;
}

int main() {
  while(cin >> a[0] >> a[1] >> a[2] >> a[3] && a[0]) {
    if(!v_dfs(0)) cout << "0" << endl;
  }
  return 0;
}