// 標準入力
var fs = require('fs'),
length = fs.fstatSync(process.stdin.fd).size,
buffer = new Buffer(length),
bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0),
input = buffer.toString('utf8', 0, bytesRead).trim().split('\n');
main();
 
function main(){
  var operands = ['+', '-', '*'];
  var inp;
  for(var i = 0; (inp = input[i]) != '0 0 0 0'; i++){
    inp = new Int8Array(inp.split(' ').map(Number));
    var found = false;

    var searched = new Int8Array(10000);
 
  FIRST:for(var a = 0; a < 4; a++){
    var inpa = inp[a]; // 配列アクセス数削減
    for(var b = 0; b < 4; b++){
      if(a==b)continue;
      var inpb = inp[b];
      for(var c = 0; c < 4; c++){
        if(a==c||b==c)continue;
        var inpc = inp[c];
        for(var d = 0; d < 4; d++){
          if(a==d||b==d||c==d)continue;
          var inpd = inp[d];

          var target = inpa*1000 + inpb*100 + inpc*10 + inpd;
          if(searched[target])
            continue;
          searched[target]++;

          for(var op1 = 0; op1 < 3; op1++){
            var operandsop1 = operands[op1];
            for(var op2 = 0; op2 < 3; op2++){
              var operandsop2 = operands[op2];
              for(var op3 = 0; op3 < 3; op3++){
                var operandsop3 = operands[op3];
                if(op1 == 1 && op2 == 1 && op3 == 1)continue;
                
                for(var pattern = 0; pattern < 3; pattern++){
                  var polish = [];
                  switch(pattern){
                  case 0:
                    // pattern1:num num op num op num op (((a op1 b) op2 c) op3 d)
                    polish = [inpa, inpb, operandsop1, inpc, operandsop2, inpd, operandsop3];
                    break;
                  case 1:
                    // pattern2:num num num op op num op ((a op2 (b op1 c)) op3 d)
                    polish = [inpa, inpb, inpc, operandsop1, operandsop2, inpd, operandsop3];
                    break;
                  case 2:
                    // pattern3:num num num num op op op ((c op1 d) op3 (a op2 b))
                    polish = [inpa, inpb, operandsop1,inpc, inpd, operandsop2, operandsop3];
                    break;
                  }
 
                  var stack = [];
                  for(var j = 0; j < 7; j++){
                    var h = polish[j];
                    switch(h){
                    case '+':
                      stack.push(stack.pop() + stack.pop());
                      break;
                    case '-':
                      stack.push(-stack.pop() + stack.pop());
                      break;
                    case '*':
                      stack.push(stack.pop() * stack.pop());
                      break;
                    default:
                      stack.push(h);
                      break;
                    }
                  }
 
                  if(stack.pop() == 10){
                    found = true;
 
                    var result = [];
                    var l, r;
                    for(var j = 0; j < 7; j++){
                    var h = polish[j];
                      if(h == '+' || h == '-' || h == '*'){
                        r = result.pop();
                        l = result.pop();
                        result.push("(" + l + " " + h + " " + r + ")");
                      }else{
                        result.push(h);
                      }
                    }
                     
                    console.log(result.pop());
                    break FIRST;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
 
    if(!found)
      console.log(0);
     
  }
}

Measured memory_bytes: 10880