#include <bits/stdc++.h>
using namespace std;

int main()
{
	while (true){
		vector<int> v(4);
		for (int i = 0; i < 4; i++) scanf("%d", &v[i]);
		if (v[0] + v[1] + v[2] + v[3] == 0) return 0;
		sort(v.begin(), v.end());
		
		while (true){
			bool f = true;
			
			int a = v[0];
			int b = v[1];
			int c = v[2];
			int d = v[3];
			
			if      (a + b + c + d == 10) printf("%d + %d + %d + %d\n",a,b,c,d);
			else if (a + b + c - d == 10) printf("%d + %d + %d - %d\n",a,b,c,d);
			else if (a + b - c + d == 10) printf("%d + %d - %d + %d\n",a,b,c,d);
			else if (a + b - c - d == 10) printf("%d + %d - %d - %d\n",a,b,c,d);
			else if (a - b + c - d == 10) printf("%d - %d + %d - %d\n",a,b,c,d);
			else if (a - b - c + d == 10) printf("%d - %d - %d + %d\n",a,b,c,d);
			else if (a - b - c - d == 10) printf("%d - %d - %d - %d\n",a,b,c,d);
			
			else if (a + b + c * d == 10) printf("%d + %d + %d * %d\n",a,b,c,d);
			else if (a + b - c * d == 10) printf("%d + %d - %d * %d\n",a,b,c,d);
			else if (a - b + c * d == 10) printf("%d - %d + %d * %d\n",a,b,c,d);
			else if (a - b - c * d == 10) printf("%d - %d - %d * %d\n",a,b,c,d);
			
			else if (a + b * c + d == 10) printf("%d + %d * %d + %d\n",a,b,c,d);
			else if (a + b * c - d == 10) printf("%d + %d * %d - %d\n",a,b,c,d);
			else if (a - b * c + d == 10) printf("%d - %d * %d + %d\n",a,b,c,d);
			else if (a - b * c - d == 10) printf("%d - %d * %d - %d\n",a,b,c,d);
			
			else if (a * b + c + d == 10) printf("%d * %d + %d + %d\n",a,b,c,d);
			else if (a * b - c + d == 10) printf("%d * %d - %d + %d\n",a,b,c,d);
			else if (a * b + c - d == 10) printf("%d * %d + %d - %d\n",a,b,c,d);
			else if (a * b - c - d == 10) printf("%d * %d - %d - %d\n",a,b,c,d);
			
			else if (a + b * c * d == 10) printf("%d + %d * %d * %d\n",a,b,c,d);
			else if (a - b * c * d == 10) printf("%d - %d * %d * %d\n",a,b,c,d);
			
			else if (a * b + c * d == 10) printf("%d * %d + %d * %d\n",a,b,c,d);
			else if (a * b - c * d == 10) printf("%d * %d - %d * %d\n",a,b,c,d);
			
			else if (a * b * c + d == 10) printf("%d * %d * %d + %d\n",a,b,c,d);
			else if (a * b * c - d == 10) printf("%d * %d * %d - %d\n",a,b,c,d);
			
			else if (a * b * c * d == 10) printf("%d * %d * %d * %d\n",a,b,c,d);
			
			// (a . b) . c . d
			else if ((a + b) * c + d == 10) printf("(%d + %d) * %d + %d\n",a,b,c,d);
			else if ((a + b) * c - d == 10) printf("(%d + %d) * %d - %d\n",a,b,c,d);
			else if ((a - b) * c + d == 10) printf("(%d - %d) * %d + %d\n",a,b,c,d);
			else if ((a - b) * c - d == 10) printf("(%d - %d) * %d - %d\n",a,b,c,d);
			else if ((a + b) * c * d == 10) printf("(%d + %d) * %d * %d\n",a,b,c,d);
			else if ((a - b) * c * d == 10) printf("(%d - %d) * %d * %d\n",a,b,c,d);
			
			// a . (b . c) . d
			else if (a * (b + c) + d == 10) printf("%d * (%d + %d) + %d\n",a,b,c,d);
			else if (a * (b - c) + d == 10) printf("%d * (%d - %d) + %d\n",a,b,c,d);
			else if (a * (b + c) - d == 10) printf("%d * (%d + %d) - %d\n",a,b,c,d);
			else if (a * (b - c) - d == 10) printf("%d * (%d - %d) - %d\n",a,b,c,d);
			else if (a * (b + c) * d == 10) printf("%d * (%d + %d) * %d\n",a,b,c,d);
			else if (a * (b - c) * d == 10) printf("%d * (%d - %d) * %d\n",a,b,c,d);
			
			// a . b . (c . d)
			else if (a + b * (c + d) == 10) printf("%d + %d * (%d + %d)\n",a,b,c,d);
			else if (a + b * (c - d) == 10) printf("%d + %d * (%d - %d)\n",a,b,c,d);
			else if (a - b * (c + d) == 10) printf("%d - %d * (%d + %d)\n",a,b,c,d);
			else if (a - b * (c - d) == 10) printf("%d - %d * (%d - %d)\n",a,b,c,d);
			else if (a * b - (c + d) == 10) printf("%d * %d - (%d + %d)\n",a,b,c,d);
			else if (a * b + (c - d) == 10) printf("%d * %d + (%d - %d)\n",a,b,c,d);
			else if (a * b * (c + d) == 10) printf("%d * %d * (%d + %d)\n",a,b,c,d);
			else if (a * b * (c - d) == 10) printf("%d * %d * (%d - %d)\n",a,b,c,d);
			
			// (a . b) . (c . d)
			else if ((a + b) * (c + d) == 10) printf("(%d + %d) * (%d + %d)\n",a,b,c,d);
			else if ((a + b) * (c - d) == 10) printf("(%d + %d) * (%d - %d)\n",a,b,c,d);
			else if ((a - b) * (c + d) == 10) printf("(%d - %d) * (%d + %d)\n",a,b,c,d);
			else if ((a - b) * (c - d) == 10) printf("(%d - %d) * (%d - %d)\n",a,b,c,d);
			else if ((a + b) * (c * d) == 10) printf("(%d + %d) * (%d * %d)\n",a,b,c,d);
			else if ((a - b) * (c * d) == 10) printf("(%d - %d) * (%d * %d)\n",a,b,c,d);
			
			// ((a . b) . c) . d
			else if (((a + b) + c) * d == 10) printf("((%d + %d) + %d) * %d\n",a,b,c,d);
			else if (((a + b) - c) * d == 10) printf("((%d + %d) - %d) * %d\n",a,b,c,d);
			else if (((a - b) + c) * d == 10) printf("((%d - %d) + %d) * %d\n",a,b,c,d);
			else if (((a - b) - c) * d == 10) printf("((%d - %d) - %d) * %d\n",a,b,c,d);
			else if (((a * b) + c) * d == 10) printf("((%d * %d) + %d) * %d\n",a,b,c,d);
			else if (((a * b) - c) * d == 10) printf("((%d * %d) - %d) * %d\n",a,b,c,d);
			
			// (a . (b . c)) . d
			else if ((a + (b * c)) + d == 10) printf("(%d + (%d * %d)) + %d\n",a,b,c,d);
			else if ((a + (b * c)) - d == 10) printf("(%d + (%d * %d)) - %d\n",a,b,c,d);
			else if ((a - (b * c)) + d == 10) printf("(%d - (%d * %d)) + %d\n",a,b,c,d);
			else if ((a - (b * c)) - d == 10) printf("(%d - (%d * %d)) - %d\n",a,b,c,d);
			else if ((a + (b * c)) * d == 10) printf("(%d + (%d * %d)) * %d\n",a,b,c,d);
			else if ((a - (b * c)) * d == 10) printf("(%d - (%d * %d)) * %d\n",a,b,c,d);
			
			// a . ((b . c) . d)
			else if (a + ((b * c) + d) == 10) printf("%d + ((%d * %d) + %d)\n",a,b,c,d);
			else if (a + ((b * c) - d) == 10) printf("%d + ((%d * %d) - %d)\n",a,b,c,d);
			else if (a - ((b * c) + d) == 10) printf("%d - ((%d * %d) + %d)\n",a,b,c,d);
			else if (a - ((b * c) - d) == 10) printf("%d - ((%d * %d) - %d)\n",a,b,c,d);
			else if (a * ((b + c) + d) == 10) printf("%d * ((%d + %d) + %d)\n",a,b,c,d);
			else if (a * ((b - c) + d) == 10) printf("%d * ((%d - %d) + %d)\n",a,b,c,d);
			else if (a * ((b + c) - d) == 10) printf("%d * ((%d + %d) - %d)\n",a,b,c,d);
			else if (a * ((b - c) - d) == 10) printf("%d * ((%d - %d) - %d)\n",a,b,c,d);
			else if (a * ((b * c) + d) == 10) printf("%d * ((%d * %d) + %d)\n",a,b,c,d);
			else if (a * ((b * c) - d) == 10) printf("%d * ((%d * %d) - %d)\n",a,b,c,d);
			
			// a . (b . (c . d))
			else if (a + (b + (c * d)) == 10) printf("%d + (%d + (%d * %d))\n",a,b,c,d);
			else if (a + (b - (c * d)) == 10) printf("%d + (%d - (%d * %d))\n",a,b,c,d);
			else if (a - (b + (c * d)) == 10) printf("%d - (%d + (%d * %d))\n",a,b,c,d);
			else if (a - (b - (c * d)) == 10) printf("%d - (%d - (%d * %d))\n",a,b,c,d);
			else if (a + (b * (c + d)) == 10) printf("%d + (%d * (%d + %d))\n",a,b,c,d);
			else if (a + (b * (c - d)) == 10) printf("%d + (%d * (%d - %d))\n",a,b,c,d);
			else if (a - (b * (c + d)) == 10) printf("%d - (%d * (%d + %d))\n",a,b,c,d);
			else if (a - (b * (c - d)) == 10) printf("%d - (%d * (%d - %d))\n",a,b,c,d);
			else if (a * (b + (c + d)) == 10) printf("%d * (%d + (%d + %d))\n",a,b,c,d);
			else if (a * (b - (c + d)) == 10) printf("%d * (%d - (%d + %d))\n",a,b,c,d);
			else if (a * (b + (c - d)) == 10) printf("%d * (%d + (%d - %d))\n",a,b,c,d);
			else if (a * (b - (c - d)) == 10) printf("%d * (%d - (%d - %d))\n",a,b,c,d);
			else if (a * (b + (c * d)) == 10) printf("%d * (%d + (%d * %d))\n",a,b,c,d);
			else if (a * (b - (c * d)) == 10) printf("%d * (%d - (%d * %d))\n",a,b,c,d);
			else f = false;
			
			if (f) break;
			if (!next_permutation(v.begin(), v.end())){
				puts("0");
				break;
			}
		}
	}
}