#include <bits/stdc++.h>  

using namespace std;

#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;

bool flag = false;

void solve(int a, int b, int c, int d) {
	//cout << a << " " << b << " " << c << " " << d << endl;
	if(a + b + c + d == 10) {printf("%d + %d + %d + %d\n", a, b, c, d); flag = true; return;}
	else if(a + b + c - d == 10) {printf("%d + %d + %d - %d\n", a, b, c, d); flag = true; return;}
	else if(a + b + c * d == 10) {printf("%d + %d + %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a + b - c + d == 10) {printf("%d + %d - %d + %d\n", a, b, c, d); flag = true; return;}
	else if(a + b - c - d == 10) {printf("%d + %d - %d - %d\n", a, b, c, d); flag = true; return;}
	else if(a + b - c * d == 10) {printf("%d + %d - %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a + b * c + d == 10) {printf("%d + %d * %d + %d\n", a, b, c, d); flag = true; return;}
	else if(a + b * c - d == 10) {printf("%d + %d * %d - %d\n", a, b, c, d); flag = true; return;}
	else if(a + b * c * d == 10) {printf("%d + %d * %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a - b + c + d == 10) {printf("%d - %d + %d + %d\n", a, b, c, d); flag = true; return;}
	else if(a - b + c - d == 10) {printf("%d - %d + %d - %d\n", a, b, c, d); flag = true; return;}
	else if(a - b + c * d == 10) {printf("%d - %d + %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a - b - c + d == 10) {printf("%d - %d - %d + %d\n", a, b, c, d); flag = true; return;}
	else if(a - b - c - d == 10) {printf("%d - %d - %d - %d\n", a, b, c, d); flag = true; return;}
	else if(a - b - c * d == 10) {printf("%d - %d - %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a - b * c + d == 10) {printf("%d - %d * %d + %d\n", a, b, c, d); flag = true; return;}
	else if(a - b * c - d == 10) {printf("%d - %d * %d - %d\n", a, b, c, d); flag = true; return;}
	else if(a - b * c * d == 10) {printf("%d - %d * %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a * b + c + d == 10) {printf("%d * %d + %d + %d\n", a, b, c, d); flag = true; return;}
	else if(a * b + c - d == 10) {printf("%d * %d + %d - %d\n", a, b, c, d); flag = true; return;}
	else if(a * b + c * d == 10) {printf("%d * %d + %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a * b - c + d == 10) {printf("%d * %d - %d + %d\n", a, b, c, d); flag = true; return;}
	else if(a * b - c - d == 10) {printf("%d * %d - %d - %d\n", a, b, c, d); flag = true; return;}
	else if(a * b - c * d == 10) {printf("%d * %d - %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a * b * c + d == 10) {printf("%d * %d * %d + %d\n", a, b, c, d); flag = true; return;}
	else if(a * b * c - d == 10) {printf("%d * %d * %d - %d\n", a, b, c, d); flag = true; return;}
	else if(a * b * c * d == 10) {printf("%d * %d * %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a * (b - c) * d == 10) {printf("%d * (%d - %d) * %d\n", a, b, c, d); flag = true; return;}
	else if(a * b * (c + d) == 10) {printf("%d * %d * (%d + %d)\n", a, b, c, d); flag = true; return;}
	else if(a * b * (c - d) == 10) {printf("%d * %d * (%d - %d)\n", a, b, c, d); flag = true; return;}
	else if(a + (b + c) * d == 10) {printf("%d + (%d + %d) * %d\n", a, b, c, d); flag = true; return;}
	else if((a + (b + c)) * d == 10) {printf("(%d + %d + %d) * %d\n", a, b, c, d); flag = true; return;}
	else if(a + b - (c + d) == 10) {printf("%d + %d - (%d + %d)\n", a, b, c, d); flag = true; return;}
	else if(a + (b - c) * d == 10) {printf("%d + (%d - %d) * %d\n", a, b, c, d); flag = true; return;}
	else if((a + b - c) * d == 10) {printf("(%d + %d - %d) * %d\n", a, b, c, d); flag = true; return;}
	else if(a + b * (c + d) == 10) {printf("%d + %d * (%d + %d)\n", a, b, c, d); flag = true; return;}
	else if((a + b) * c + d == 10) {printf("(%d + %d) * (%d + %d)\n", a, b, c, d); flag = true; return;}
	else if((a + b) * (c + d) == 10) {printf("%d + %d * %d + %d\n", a, b, c, d); flag = true; return;}
	else if(a + b * (c - d) == 10) {printf("%d + %d * (%d - %d)\n", a, b, c, d); flag = true; return;}
	else if((a + b) * c - d == 10) {printf("(%d + %d) * %d - %d\n", a, b, c, d); flag = true; return;}
	else if((a + b) * (c - d) == 10) {printf("(%d + %d) * (%d - %d)\n", a, b, c, d); flag = true; return;}
	else if((a + b) * c * d == 10) {printf("(%d + %d) * %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a - (b + c) + d == 10) {printf("%d - (%d + %d) + %d\n", a, b, c, d); flag = true; return;}
	else if(a - (b + c + d) == 10) {printf("%d - (%d + %d + %d)\n", a, b, c, d); flag = true; return;}
	else if(a - (b + c) - d == 10) {printf("%d - (%d + %d) - %d\n", a, b, c, d); flag = true; return;}
	else if(a - (b + c - d) == 10) {printf("%d - (%d + %d - %d)\n", a, b, c, d); flag = true; return;}
	else if(a - (b + c) * d == 10) {printf("%d - (%d + %d) * %d\n", a, b, c, d); flag = true; return;}
	else if((a - b + c) * d == 10) {printf("(%d - %d + %d) * %d\n", a, b, c, d); flag = true; return;}
	else if(a - (b - c + d) == 10) {printf("%d - (%d - %d + %d)\n", a, b, c, d); flag = true; return;}
	else if(a - (b - c) + d == 10) {printf("%d - (%d - %d) + %d\n", a, b, c, d); flag = true; return;}
	else if(a - b - (c - d) == 10) {printf("%d - %d - (%d - %d)\n", a, b, c, d); flag = true; return;}
	else if(a - (b - c - d) == 10) {printf("%d - (%d - %d - %d)\n", a, b, c, d); flag = true; return;}
	else if(a - (b - c) - d == 10) {printf("%d - (%d - %d) - %d\n", a, b, c, d); flag = true; return;}
	else if(a - (b - c) * d == 10) {printf("%d - (%d - %d) * %d\n", a, b, c, d); flag = true; return;}
	else if((a - b - c) * d == 10) {printf("(%d - %d - %d) * %d\n", a, b, c, d); flag = true; return;}
	else if(a - b * (c + d) == 10) {printf("%d - %d * (%d + %d)\n", a, b, c, d); flag = true; return;}
	else if((a - b) * c + d == 10) {printf("(%d - %d) * %d + %d\n", a, b, c, d); flag = true; return;}
	else if((a - b) * (c + d) == 10) {printf("(%d - %d) * (%d + %d)\n", a, b, c, d); flag = true; return;}
	else if(a - b * (c - d) == 10) {printf("%d - %d * (%d - %d)\n", a, b, c, d); flag = true; return;}
	else if((a - b) * c - d == 10) {printf("(%d - %d) * %d - %d\n", a, b, c, d); flag = true; return;}
	else if((a - b) * (c - d) == 10) {printf("(%d - %d) * (%d - %d)\n", a, b, c, d); flag = true; return;}
	else if((a - b) * c * d == 10) {printf("(%d - %d) * %d * %d\n", a, b, c, d); flag = true; return;}
	else if(a * b + (c + d) == 10) {printf("%d * %d + (%d + %d)\n", a, b, c, d); flag = true; return;}
	else if(a * (b + c + d) == 10) {printf("%d * (%d + %d + %d)\n", a, b, c, d); flag = true; return;}
	else if(a * (b + c) + d == 10) {printf("%d * (%d + %d) + %d\n", a, b, c, d); flag = true; return;}
	else if(a * (b + c - d) == 10) {printf("%d * (%d + %d - %d)\n", a, b, c, d); flag = true; return;}
	else if(a * (b + c) - d == 10) {printf("%d * (%d + %d) - %d\n", a, b, c, d); flag = true; return;}
	else if(a * (b + c) * d == 10) {printf("%d * (%d + %d) * %d\n", a, b, c, d); flag = true; return;}
	else if(a * b - (c + d) == 10) {printf("%d * %d - (%d + %d)\n", a, b, c, d); flag = true; return;}
	else if(a * (b - c + d) == 10) {printf("%d * %d - (%d + %d)\n", a, b, c, d); flag = true; return;}
	else if(a * (b - c) + d == 10) {printf("%d * (%d - %d) + %d\n", a, b, c, d); flag = true; return;}
	else if(a * b - (c - d) == 10) {printf("%d * %d - (%d - %d)\n", a, b, c, d); flag = true; return;}
	else if(a * (b - c - d) == 10) {printf("%d * (%d - %d - %d)\n", a, b, c, d); flag = true; return;}
	else if(a * (b - c) - d == 10) {printf("%d * (%d - %d) - %d\n", a, b, c, d); flag = true; return;}
}

int main() {
	int a[4];
	while(1) {
		rep(i, 4) cin >> a[i];
		if(a[0] == 0) break;
		rep(i, 4) rep(j, 4) rep(k, 4) rep(l, 4) {
			if(i == j || i == k || i == l || j == k || j == l || k == l) continue;
			if(!flag) solve(a[i], a[j], a[k], a[l]);

		}
		if(!flag) printf("0\n");
	}
	return 0;
}