#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int mathf(int x,int y,int m);
int main(){
	for(;;){
		int row[4],i[3];
		cin >>row[0]>>row[1]>>row[2]>>row[3];
		if(row[0] + row[1] + row[2] + row[3] == 0){break;}
		do{
			for(i[0]=0; i[0]<3; i[0]++){
				for(i[1]=0; i[1]<3; i[1]++){
					for(i[2]=0; i[2]<3; i[2]++){
						for(int l=0; l<5; l++){
							int sum = 0;
							if(l == 0){sum = mathf(mathf(mathf(row[0],row[1],i[0]),row[2],i[1]),row[3],i[2]);}
							else if(l == 1){sum = mathf(mathf(row[0],row[1],i[0]),mathf(row[2],row[3],i[2]),i[1]);}
							else if(l == 2){sum = mathf(mathf(row[0],mathf(row[1],row[2],i[1]),i[0]),row[3],i[2]);}
							else if(l == 3){sum = mathf(row[0],mathf(mathf(row[1],row[2],i[1]),row[3],i[2]),i[0]);}
							else if(l == 4){sum = mathf(row[0],mathf(row[1],mathf(row[2],row[3],i[2]),i[1]),i[0]);}
							if(sum == 10){
								char fanc[3];
								for(int j=0; j<3; j++){
									if(i[j] == 0){fanc[j] = '+';}
									if(i[j] == 1){fanc[j] = '-';}
									if(i[j] == 2){fanc[j] = '*';}
								}
								if (l == 0){printf("(((%d%c%d)%c%d)%c%d)\n",row[0],fanc[0],row[1],fanc[1],row[2],fanc[2],row[3]);goto end;}
								else if (l == 1){printf("((%d%c%d)%c(%d%c%d))\n",row[0],fanc[0],row[1],fanc[1],row[2],fanc[2],row[3]);goto end;}
								else if (l == 2){printf("((%d%c(%d%c%d))%c%d)\n",row[0],fanc[0],row[1],fanc[1],row[2],fanc[2],row[3]);goto end;}
								else if (l == 3){printf("(%d%c((%d%c%d)%c%d))\n",row[0],fanc[0],row[1],fanc[1],row[2],fanc[2],row[3]);goto end;}
								else if (l == 4){printf("(%d%c(%d%c(%d%c%d)))\n",row[0],fanc[0],row[1],fanc[1],row[2],fanc[2],row[3]);goto end;}
							}
						}
					}
				}
			}
		}while(next_permutation(row,row+4));
		cout <<"0"<<endl;
		end:;
	}
	return 0;
}
int mathf(int x,int y,int m){
	if(m == 0){return x+y;}
	if(m == 1){return x-y;}
	if(m == 2){return x*y;}
	return 0;
}