#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int a[4];
bool used[4];
string res;
string ch[3] = {" + ", " - ", " * "};

string conv(int p)
{
  char ch = (char)(p+'0');
  string st = "";
  st += ch;

  return st;
}

int calc(int op, int s, int t)
{
  if(op == 0) return s+t;
  if(op == 1) return s-t;
  return s*t;
}

bool func(string str, int p, int r)
{
  int t;
  string s;

  if(p == 1){
    for(int i = 1; i < 4; ++i){
      used[i] = false;
      for(int j = 0; j < 3; ++j)
	if(func(("("+conv(a[i-1])+ch[j]+conv(a[i])+")"), 2, calc(j, a[i-1], a[i]))) return true;
      used[i] = true;
    }
  } else if(p == 2){
    if(!used[1]){
      for(int i = 0; i < 3; ++i){
	s = ("("+str+ch[i]+conv(a[2])+")");
	t = calc(i, r, a[2]);

	for(int j = 0; j < 3; ++j)
	  if(calc(j, t, a[3]) == 10){
	    res = ("("+s+ch[j]+conv(a[3])+")");
	    return true;
	  }

      }

      for(int i = 0; i < 3; ++i){
	s = ("("+conv(a[2])+ch[i]+conv(a[3])+")");
	t = calc(i, a[2], a[3]);

	for(int j = 0; j < 3; ++j)
	  if(calc(j, r, t) == 10){
	    res = ("("+str+ch[j]+s+")");
	    return true;
	  }
      }
    } else if(!used[2]){
      for(int i = 0; i < 3; ++i){
	s = ("("+conv(a[0])+ch[i]+str+")");
	t = calc(i, a[0], r);

	for(int j = 0; j < 3; ++j)
	  if(calc(j, t, a[3]) == 10){
	    res = ("("+s+ch[j]+conv(a[3])+")");
	    return true;
	  }
      }

      for(int i = 0; i < 3; ++i){
	s = ("("+str+ch[i]+conv(a[3])+")");
	t = calc(i, r, a[3]);

	for(int j = 0; j < 3; ++j)
	  if(calc(j, a[0], t) == 10){
	    res = ("("+conv(a[0])+ch[j]+s+")");
	    return true;
	  }
      }
    } else if(!used[3]){
      for(int i = 0; i < 3; ++i){
	s = ("("+conv(a[1])+ch[i]+str+")");
	t = calc(i, a[1], r);

	for(int j = 0; j < 3; ++j)
	  if(calc(j, a[0], t) == 10){
	    res = ("(" + conv(a[0])+ch[j]+s+")");
	    return true;
	  }
      }
    }
  }

  return false;
}

int main()
{
  int t;

  while(1){
    t = 0;
    res = "0";
    for(int i = 0; i < 4; ++i){ cin >> a[i]; t += a[i];}
    if(!t) break;
    fill(used, used+4, true);

    do {
      if(func("", 1, 0)) break;
    } while(next_permutation(a, a+4));

    cout << res << endl;
  }

  return 0;
}