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

int calculate(int a,int b,char c){
	int ans = 0;
	if( c == '+' )
		ans = a + b;
	else if( c == '-' )
		ans = a - b;
	else if( c == '*' )
		ans = a * b;
	return ans;
}

string foo(const string& s, int x, char op){
	string ex = "(";
	ex += s;
	ex.push_back( ' ' );
	ex.push_back( op );
	ex.push_back( ' ' );
	ex.push_back( x + '0' );
	ex.push_back( ')' );
	return ex;
}

int main(){
	char o[3] = {'+','-','*'};
	int a,b,c,d, ans;
	
	while( cin >> a >> b >> c >> d , a|b|c|d ){
		vector<int> vc;
		bool flag = true;
		vc.push_back( a );
		vc.push_back( b );
		vc.push_back( c );
		vc.push_back( d );

		do{
			for(int i=0 ; i<3 && flag ; ++i ){
				string str;
				str.push_back( vc[0] + '0' );
				string ex1 = foo( str   , vc[1] , o[i] );
				ans  = calculate( vc[0] , vc[1] , o[i] );
				
				for(int j=0 ; j<3 && flag ; ++j ){
					string ex2 = foo( ex1 , vc[2] , o[j] );
					int ans2  = calculate( ans , vc[2] , o[j] );
	
					for(int k=0 ; k<3 && flag ; ++k ){
						string ex3 = foo( ex2 , vc[3] , o[k] );
						int ans3  = calculate( ans2 , vc[3] , o[k] );
	
						if( ans3 == 10 ){
							flag = false;
							cout << ex3 << endl;
						}
					}
				}
	
				for(int j=0 ; j<3 ; ++j ){
					string str2;
					str2.push_back( vc[2] + '0' );
					string ex2 = foo( str2  , vc[3] , o[i] );
					int ans2  = calculate( vc[2] , vc[3] , o[j] );
	
					for(int k=0 ; k<3 ; ++k ){
						string ex3 = "(";
						ex3 += ex1;
						ex3.push_back( ' ' );
						ex3.push_back( o[k] );
						ex3.push_back( ' ' );
						ex3 += ex2;
						ex3.push_back( ')' );
						int ans3  = calculate( ans , ans2 , o[k] );
	
						if( ans3 == 10 ){
							flag = false;
							cout << ex3 << endl;
						}
					}
				}
			}
		}while( next_permutation( vc.begin() , vc.end() ) );
		if( flag )
			cout << 0 << endl;
	}
}