#include<bits/stdc++.h>
#define for0(i, n) for(int i = 0; i < (n); i++)
#define for1(i, n) for(int i = 1; i <= (n);i++)
using namespace std;
int a[4], b[4], x[4];
signed main() {
	while (1) {
		for0(i, 4) {
			cin >> a[i];
			b[i] = i;
		}
		if (a[1] == 0)return 0;
		bool k = 0;
		do {
			for0(i, 4)x[i] = a[b[i]];
			if (x[0] + x[1] + x[2] + x[3] == 10) { k = 1; printf("%d + %d + %d + %d\n", x[0], x[1], x[2], x[3]); break; }
			if (x[0] + x[1] + x[2] - x[3] == 10) { k = 1; printf("%d + %d + %d - %d\n", x[0], x[1], x[2], x[3]); break; }
			if (x[0] + x[1] - x[2] - x[3] == 10) { k = 1; printf("%d + %d - %d - %d\n", x[0], x[1], x[2], x[3]); break; }
			if (x[0] * x[1] + x[2] + x[3] == 10) { k = 1; printf("%d * %d + %d + %d\n", x[0], x[1], x[2], x[3]); break; }
			if (x[0] * x[1] + x[2] - x[3] == 10) { k = 1; printf("%d * %d + %d - %d\n", x[0], x[1], x[2], x[3]); break; }
			if (x[0] * x[1] - x[2] - x[3] == 10) { k = 1; printf("%d * %d - %d - %d\n", x[0], x[1], x[2], x[3]); break; }
			if (x[0] + x[1] - x[2] * x[3] == 10) { k = 1; printf("%d + %d - %d * %d\n", x[0], x[1], x[2], x[3]); break; }
			if (x[0] * x[1] + x[2] * x[3] == 10) { k = 1; printf("%d * %d + %d * %d\n", x[0], x[1], x[2], x[3]); break; }
			if (x[0] * x[1] - x[2] * x[3] == 10) { k = 1; printf("%d * %d - %d * %d\n", x[0], x[1], x[2], x[3]); break; }
			if ((x[0] + x[1]) * x[2] + x[3] == 10) { k = 1; printf("(%d + %d) * %d + %d\n", x[0], x[1], x[2], x[3]); break; }
			if ((x[0] + x[1]) * x[2] - x[3] == 10) { k = 1; printf("(%d + %d) * %d - %d\n", x[0], x[1], x[2], x[3]); break; }
			if ((x[0] - x[1]) * x[2] + x[3] == 10) { k = 1; printf("(%d - %d) * %d + %d\n", x[0], x[1], x[2], x[3]); break; }
			if ((x[0] - x[1]) * x[2] - x[3] == 10) { k = 1; printf("(%d - %d) * %d - %d\n", x[0], x[1], x[2], x[3]); break; }
			if ((x[0] + x[1]) * (x[2] + x[3]) == 10) { k = 1; printf("(%d + %d) * (%d + %d)\n", x[0], x[1], x[2], x[3]); break; }
			if ((x[0] + x[1]) * (x[2] - x[3]) == 10) { k = 1; printf("(%d + %d) * (%d - %d)\n", x[0], x[1], x[2], x[3]); break; }
			if ((x[0] - x[1]) * (x[2] - x[3]) == 10) { k = 1; printf("(%d - %d) * (%d - %d)\n", x[0], x[1], x[2], x[3]); break; }
		} while (next_permutation(b, b + 4));
		if (!k)printf("0\n");
	}
}
