#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;

int calc(int a, int b, char op){
    if( op=='+' )
        return a+b;
    if( op=='-' )
        return a-b;
    if( op=='*' )
        return a*b;
}

int main(){
    vector<int> in(4);
    while(1){
        bool found = false;
        scanf("%d %d %d %d", &in[0], &in[1], &in[2], &in[3]);
        if( in[0]==0 && in[1]==0 && in[2]==0 && in[3]==0 )  break;
        do{
            for( int i=0; i<3; i++ ){
                for( int j=0; j<3; j++ ){
                    for( int k=0; k<3; k++ ){
                        char op[3] = {'+','-','*'};
                        int res = calc( calc( calc(in[0],in[1],op[i]), in[2], op[j] ), in[3], op[k] );
                        if( res == 10 ){
                            printf("((%d %c %d) %c %d) %c %d\n", in[0],op[i],in[1],op[j],in[2],op[k],in[3]);
                            found = true;
                            break;
                        }
                        res = calc( calc(in[0],in[1],op[i]), calc(in[2],in[3],op[k]), op[j] );
                        if( res == 10 ){
                            printf("(%d %c %d) %c (%d %c %d)\n",in[0],op[i],in[1],op[j],in[2],op[k],in[3]);
                            found = true;
                            break;
                        }
                        res = calc( calc( in[0], calc(in[1],in[2],op[j]), op[i] ), in[3], op[k] );
                        if( res == 10 ){
                            printf("%d %c (%d %c %d) %c %d\n",in[0],op[i],in[1],op[j],in[2],op[k],in[3]);
                            found = true;
                            break;
                        }
                    }
                    if(found)   break;
                }
                if(found)   break;
            }
            if(found)   break;
        }while(next_permutation(in.begin(), in.end()));
        if( !found )
            printf("0\n");
    }
    return 0;
}