#include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;
#define int long long
void solve(vector<int> a){
                do{
                        for(int i=0;i<3;i++){
                                for(int j=0;j<3;j++){
                                        for(int k=0;k<3;k++){
                                                int ans = a[0];
                                                if(i==0) ans+=a[1];
                                                else if(i==1) ans-=a[1];
                                                else ans*=a[1];
                                                if(j==0) ans+=a[2];
                                                else if(j==1) ans-=a[2];
                                                else ans*=a[2];
                                                if(k==0) ans+=a[3];
                                                else if(k==1) ans-=a[3];
                                                else ans*=a[3];
                                                if(ans==10){
                                                        string as = "";
                                                        as += "(((" + to_string(a[0]);
                                                        if(i==0) as+=" + ";
                                                        else if(i==1) as+=" - ";
                                                        else as+=" * ";
                                                        as += to_string(a[1]) + ")";
                                                        if(j==0) as+=" + ";
                                                        else if(j==1) as+=" - ";
                                                        else as+=" * ";
                                                        as += to_string(a[2]) + ")";
                                                        if(k==0) as+=" + ";
                                                        else if(k==1) as+=" - ";
                                                        else as+=" * ";
                                                        as += to_string(a[3]) + ")";
                                                        cout << as << endl;
                                                        return;
                                                }
                                        }
                                }
                        }
                        for(int i=0;i<3;i++){
                                for(int j=0;j<3;j++){
                                        for(int k=0;k<3;k++){
                                                int ans1 = a[0];
                                                if(i==0) ans1+=a[1];
                                                else if(i==1) ans1-=a[1];
                                                else ans1*=a[1];
                                                int ans2 = a[2];
                                                if(k==0) ans2+=a[3];
                                                else if(k==1) ans2-=a[3];
                                                else ans2*=a[3];
                                                int ans;
                                                if(j==0) ans=ans1+ans2;
                                                else if(j==1) ans=ans1-ans2;
                                                else ans=ans1*ans2;
                                                if(ans==10){
                                                        string as = "";
                                                        as += "((" + to_string(a[0]);
                                                        if(i==0) as+=" + ";
                                                        else if(i==1) as+=" - ";
                                                        else as+=" * ";
                                                        as += to_string(a[1]) + ")";
                                                        if(j==0) as+=" + ";
                                                        else if(j==1) as+=" - ";
                                                        else as+=" * ";
                                                        as += "(" + to_string(a[2]);
                                                        if(k==0) as+=" + ";
                                                        else if(k==1) as+=" - ";
                                                        else as+=" * ";
                                                        as += to_string(a[3]) + "))";
                                                        cout << as << endl;
                                                        return;
                                                }
                                        }
                                }
                        }
                }while(next_permutation(a.begin(),a.end()));
                cout << "0"  << endl;
}
signed main(){
        vector<int> a(4);
        while( scanf("%lld %lld %lld %lld", &a[0], &a[1], &a[2], &a[3]) != EOF ){
                if(a[0]==0&&a[1]==0&&a[2]==0&&a[3]==0) break;
                solve(a);
        }
        return 0;
}