#include<iostream>
#include<algorithm>
using namespace std;
int alice(int x, int y, char c);
int main(){
  char a[3] = {'+','-','*'},b[3] = {'+','-','*'},c[3] = {'+','-','*'};
  int n[4];
  sort(a,a+3);
  sort(b,b+3);
  sort(c,c+3);
  while(cin >>n[0]>>n[1]>>n[2]>>n[3],n[0]||n[1]||n[2]||n[3]){
    sort(n,n+4);
    bool f = false;
    do{
      do{
	do{
	  do{
	    if(alice(alice(alice(n[0],n[1],a[0]),n[2],b[0]),n[3],c[0]) == 10){cout <<"((("<<n[0]<<" "<<a[0]<<" "<<n[1]<<")"<<" "<<b[0]<<" "<<n[2]<<")"<<" "<<c[0]<<" "<<n[3]<<")"<<endl;f = true;goto ans;}
	    if(alice(alice(n[0],n[1],a[0]),alice(n[2],n[3],c[0]),b[0]) == 10){cout <<"(("<<n[0]<<" "<<a[0]<<" "<<n[1]<<")"<<" "<<b[0]<<" "<<"("<<n[2]<<" "<<c[0]<<" "<<n[3]<<"))"<<endl;f = true;goto ans;}
	    if(alice(alice(n[0],alice(n[1],n[2],b[0]),a[0]),n[3],c[0]) == 10){cout <<"(("<<n[0]<<" "<<a[0]<<" "<<"("<<n[1]<<" "<<b[0]<<" "<<n[2]<<"))"<<" "<<c[0]<<" "<<n[3]<<")"<<endl;f = true;goto ans;}
	    if(alice(n[0],alice(alice(n[1],n[2],b[0]),n[3],c[0]),a[0]) == 10){cout <<"("<<n[0]<<" "<<a[0]<<" "<<"(("<<n[1]<<" "<<b[0]<<" "<<n[2]<<")"<<" "<<c[0]<<" "<<n[3]<<"))"<<endl;f = true;goto ans;}
	    if(alice(n[0],alice(n[1],alice(n[2],n[3],c[0]),b[0]),a[0]) == 10){cout <<"("<<n[0]<<" "<<a[0]<<" "<<"("<<n[1]<<" "<<b[0]<<" "<<"("<<n[2]<<" "<<c[0]<<" "<<n[3]<<")))"<<endl;f = true;goto ans;}
	  }while(next_permutation(c,c+3));
	}while(next_permutation(b,b+3));
      }while(next_permutation(a,a+3));
    }while(next_permutation(n,n+4));
  ans:;
    if(!f){cout <<"0"<<endl;}
  }
  return 0;
}
int alice(int x, int y, char c){
  if(c == '+'){return x+y;}
  if(c == '-'){return x-y;}
  return x*y;
}