#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
typedef vector<int> vi;
#define all(c) (c).begin(), (c).end()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define pb push_back
#define sz(c) int((c).size())

typedef pair<string, int> psi;
typedef vector<psi> vpsi;

vpsi gen(int level, int ans, vi::const_iterator l, vi::const_iterator r)
{
  if (l == r)
    return vpsi(1, psi("", 0));
  else if (r - l == 1)
    return vpsi(1, psi(to_string(*l), *l));
  else {
    vpsi res;
    for (int i = 1; i <  r - l; i++) {
      vpsi lhs = gen(level+1, ans, l, l+i);
      vpsi rhs = gen(level+1, ans, l+i, r);
      tr (lhs, lp) {
        tr (rhs, rp) {
          psi tmp;
          tmp = psi("(" + lp->first + " + " + rp->first + ")",
                    lp->second + rp->second);
          if (level == 0 && tmp.second == ans)
            return vpsi(1, tmp);
          else
            res.pb(tmp);

          tmp = psi("(" + lp->first + " - " + rp->first + ")",
                    lp->second - rp->second);
          if (level == 0 && tmp.second == ans)
            return vpsi(1, tmp);
          else
            res.pb(tmp);

          tmp = psi("(" + lp->first + " * " + rp->first + ")",
                    lp->second * rp->second);
          if (level == 0 && tmp.second == ans)
            return vpsi(1, tmp);
          else
            res.pb(tmp);
        }
      }
    }
    if (level)
      return res;
    else
      return vpsi(0);
  }
}

string check(const vi& v, int ans, int& found)
{
  vpsi res;
  res = gen(0, ans, v.cbegin(), v.cend());
  if (sz(res) == 1) {
    found++;
    return res[0].first;
  } else {
    return "";
  }
}

int main(int argc, char **argv)
{
  vi v(4);
  for (;;) {
    cin >> v[0] >> v[1] >> v[2] >> v[3];
    if (v[0]+v[1]+v[2]+v[4] == 0)
      break;
    if (cin.eof())
      break;
    int found = 0;
    do {
      string res = check(v, 10, found);
      if (found) {
        cout << res << endl;
        break;
      }
    } while (next_permutation(all(v)));
    if (!found)
      cout << "0" << endl;
  }
  return 0;
}