#include <iostream>
#include <cstdlib>

using namespace std;

const static int OPERAND_N = 4;
const static int OPECODE_N = OPERAND_N - 1;
const static int OPECODE_TYPE_N = 3;
const static char OP[ OPECODE_TYPE_N ] = { '+', '-', '*' };
const static int OP_ADD = 0;
const static int OP_SUB = 1;
const static int OP_MUL = 2;
const static int EXP_CENTER_LAST = 0;
const static int EXP_LEFTMOST = 1;
const static int EXP_CENTER_FIRST_L = 2;
const static int EXP_RIGHTMOST = 3;
const static int EXP_CENTER_FIRST_R = 4;
const static int OBJ_SUM = 10;

namespace rec_data {
  int history[ OPERAND_N ] = { 0 };
  int perm_opr[ OPERAND_N ];
  int perm_opc[ OPECODE_N ];
};

bool rec_opc( int n, int operands[ OPERAND_N ], int expType ) {
  using namespace rec_data;
  if( n == 0 ) {
    for( int i = 0; i < OPECODE_N; i++ ) {
      perm_opc[ i ] = -1;
    }
  } else if( n == OPERAND_N ) {
    int p = operands[ perm_opr[ 0 ] ];
    int q = operands[ perm_opr[ 1 ] ];
    int r = operands[ perm_opr[ 2 ] ];
    int s = operands[ perm_opr[ 3 ] ];
    if( expType == EXP_CENTER_LAST ) {
      int left, right, ans;
      if( perm_opc[ 0 ] == OP_ADD ) { 
        left = p + q;
      } else if( perm_opc[ 0 ] == OP_SUB ) {
        left = p - q;
      } else {
        left = p * q;
      }
      if( perm_opc[ 2 ] == OP_ADD ) { 
        right = r + s;
      } else if( perm_opc[ 2 ] == OP_SUB ) {
        right = r - s;
      } else {
        right = r * s;
      }
      if( perm_opc[ 1 ] == OP_ADD ) { 
        ans = left + right ;
      } else if( perm_opc[ 1 ] == OP_SUB ) {
        ans = left - right;
      } else {
        ans = left * right;
      }
      if( ans == OBJ_SUM ) {
        cout << "(" << p << " " << OP[ perm_opc[ 0 ] ] << " " <<
          q << ") " << OP[ perm_opc[ 1 ] ] << " (" << r << " " <<
          OP[ perm_opc[ 2 ] ] << " " << s << ")" << endl;
        return true;
      }
      return false;
    } else if( expType == EXP_LEFTMOST ) { 
      int left, center, ans;
      if( perm_opc[ 0 ] == OP_ADD ) { 
        left = p + q;
      } else if( perm_opc[ 0 ] == OP_SUB ) {
        left = p - q;
      } else {
        left = p * q;
      }
      if( perm_opc[ 1 ] == OP_ADD ) { 
        center = left + r;
      } else if( perm_opc[ 1 ] == OP_SUB ) {
        center = left - r;
      } else {
        center = left * r;
      }
      if( perm_opc[ 2 ] == OP_ADD ) { 
        ans = center + s ;
      } else if( perm_opc[ 2 ] == OP_SUB ) {
        ans = center - s;
      } else {
        ans = center * s;
      }
      if( ans == OBJ_SUM ) {
        cout << "((" << p << " " << OP[ perm_opc[ 0 ] ] << " " <<
          q << ") " << OP[ perm_opc[ 1 ] ] << " " << r << ") " <<
          OP[ perm_opc[ 2 ] ] << " " << s << endl;
        return true;
      }
      return false;
    } else if( expType == EXP_CENTER_FIRST_L ) { 
     int left, center, ans;
     if( perm_opc[ 1 ] == OP_ADD ) { 
        center = q + r;
      } else if( perm_opc[ 1 ] == OP_SUB ) {
        center = q - r;
      } else {
        center = q * r;
      }
      if( perm_opc[ 0 ] == OP_ADD ) { 
        left = p + center;
      } else if( perm_opc[ 0 ] == OP_SUB ) {
        left = p - center;
      } else {
        left = p * center;
      }
      if( perm_opc[ 2 ] == OP_ADD ) { 
        ans = left + s ;
      } else if( perm_opc[ 2 ] == OP_SUB ) {
        ans = left - s;
      } else {
        ans = left * s;
      }
      if( ans == OBJ_SUM ) {
        cout << "(" << p << " " << OP[ perm_opc[ 0 ] ] << " (" <<
          q << " " <<  OP[ perm_opc[ 1 ] ] << " " << r << ")) " <<
          OP[ perm_opc[ 2 ] ] << " " << s << endl;
        return true;
      }
      return false;
    } else if( expType == EXP_CENTER_FIRST_R ){ 
     int right, center, ans;
     if( perm_opc[ 1 ] == OP_ADD ) { 
        center = q + r;
      } else if( perm_opc[ 1 ] == OP_SUB ) {
        center = q - r;
      } else {
        center = q * r;
      }
      if( perm_opc[ 2 ] == OP_ADD ) { 
        right = center + s;
      } else if( perm_opc[ 2 ] == OP_SUB ) {
        right = center - s;
      } else {
        right = center * s;
      }
      if( perm_opc[ 0 ] == OP_ADD ) { 
        ans = p + right ;
      } else if( perm_opc[ 0 ] == OP_SUB ) {
        ans = p - right;
      } else {
        ans = p * right;
      }
      if( ans == OBJ_SUM ) {
        cout << "(" << p << " " << OP[ perm_opc[ 0 ] ] << " ((" <<
          q << " " <<  OP[ perm_opc[ 1 ] ] << " " << r << ") " <<
          OP[ perm_opc[ 2 ] ] << ")) " << s << endl;
        return true;
      }
      return false;
    } else {
      int right, center, ans;
     if( perm_opc[ 2 ] == OP_ADD ) { 
        right = r + s;
      } else if( perm_opc[ 2 ] == OP_SUB ) {
        right = r - s;
      } else {
        right = r * s;
      }
      if( perm_opc[ 1 ] == OP_ADD ) { 
        center = q + right;
      } else if( perm_opc[ 1 ] == OP_SUB ) {
        center = q - right;
      } else {
        center = q * right;
      }
      if( perm_opc[ 0 ] == OP_ADD ) { 
        ans = p + center;
      } else if( perm_opc[ 0 ] == OP_SUB ) {
        ans = p - center;
      } else {
        ans = p * center;
      }
      if( ans == OBJ_SUM ) {
        cout << p << " " << OP[ perm_opc[ 0 ] ] << " (" <<
          q << "( " <<  OP[ perm_opc[ 1 ] ] << " " << r << " " <<
          OP[ perm_opc[ 2 ] ] << " " << s << "))" << endl;
        return true;
      }
      return false;

    }

    return false;
  }
  for( int i = 0; i < OPECODE_N; i++ ) {
    perm_opc[ n ] = i;
    bool found = rec_opc( n + 1, operands, expType );
    perm_opc[ n ] = -1;
    if( found ) { return true; }
  }
  return false;
}

bool rec_opr( int n, int operands[ OPERAND_N ], int expType  ) {
  using namespace rec_data;
  if( n == 0 ) {
    for( int i = 0; i < OPERAND_N; i++ ) {
      perm_opr[ i ] = -1;
    }
  } else if( n == OPERAND_N ) {
    return rec_opc( 0, operands, expType );
  }
  for( int i = 0; i < OPERAND_N; i++ ) {
    if( history[ i ] ) { continue; }
    perm_opr[ n ] = i;
    history[ i ] = 1;
    bool found = rec_opr( n + 1, operands, expType );
    history[ i ] = 0;
    perm_opr[ n ] = -1;
    if( found ) { return true; }
  }
  return false;
}

int main () {
  while( 1 ) {
    int operands[ OPERAND_N ];
    cin >> operands[ 0 ] >> operands[ 1 ] >> operands[ 2 ] >> operands[ 3 ];
    if(
        !( operands[ 0 ] | operands[ 1 ] | operands[ 2 ] | operands[ 3 ] )
    ){ break; }

    // ( # ? # ) ? ( # ? # )
    bool found = rec_opr( 0, operands, EXP_CENTER_LAST );
    if( found ) { continue; }

    // ((( # ? # ) ? # ) ? # )
    found = rec_opr( 0, operands, EXP_LEFTMOST );
    if( found ) { continue; }

    // ( # ? ( # ? # )) ? # )
    found = rec_opr( 0, operands, EXP_CENTER_FIRST_L );
    if( found ) { continue; }

    // ( # ? ( # ? ( # ? # )))
    found = rec_opr( 0, operands, EXP_RIGHTMOST );
    if( found ) { continue; }

    // ( # ? (( # ? # ) ? # ))
    found = rec_opr( 0, operands, EXP_CENTER_FIRST_R );
    if( found ) { continue; }
    
     cout << "0" << endl; 
  }

  return EXIT_SUCCESS;
}

Measured memory_bytes: 1164