#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <queue>
#include <climits>
#include <map>
#include <stack>
using namespace std;
#define M_PI 3.141592
#define toRad 2.0*M_PI/360.0
#define inin(x) int x;cin>>x;
#define all(x) x.begin(),x.end()
#define debug(x) cout<<#x<<" "<<x<<endl;
int hoge(int a, int b, char c)
{
	switch (c)
	{
	case '+':return a + b;
	case '-':return a - b;
	case '*':return a*b;
	}
}

int oprank(char a)
{
	if (a == '*')return 0;
	if (a == '+' || a == '-')return 1;
	return 2;
}
int calc(string a)
{
	string buf;
	stack<char> s;

	for (int i = 0; i < a.size(); i++)
	{
		if ('0' <= a[i] && a[i] <= '9')
		{
			buf += a[i];
		}
		else if (a[i] == ')')
		{
			while (s.top() != '(')
			{
				buf += s.top();
				s.pop();
			}
			s.pop();
		}
		else if (a[i] == '(' || s.empty())
		{
			s.push(a[i]);
		}
		else
		{
			bool flag = false;
			while (!s.empty())
			{
				if (oprank(s.top()) < oprank(a[i]))
				{
					buf += s.top();
					s.pop();
				}
				else
				{
					s.push(a[i]);
					flag = true;
					break;
				}
			}
			if (flag == false)
			{
				s.push(a[i]);
			}
		}
	}
	while (!s.empty())
	{
		buf += s.top();
		s.pop();
	}
	for (int i = 0; i < buf.size(); i++)
	{
		if ('0' <= buf[i] && buf[i] <= '9')
		{
			s.push(buf[i] - '0');
		}
		else
		{
			int a, b;
			b = s.top(); s.pop();
			a = s.top(); s.pop();
			s.push(hoge(a, b, buf[i]));
		}
	}
	return s.top();
}




int main()
{
	while (true)
	{
		vector<int> a;
		bool ok = false;
		for (int i = 0; i < 4; i++)
		{
			int x;
			cin >> x;
			a.push_back(x);
		}
		for (int i = 0; i < 4; i++)
		{
			if (a[i] != 0)break;
			if (i == 3)return 0;
		}
		string op = "+-*";
		do
		{
			for (int i = 0; i < 3; i++)
			{
				for (int l = 0; l < 3; l++)
				{
					for (int k = 0; k < 3; k++)
					{
						char str[150];
						string s;

						sprintf(str, "%d%c%d%c%d%c%d", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
						if (calc((string)str) == 10)
						{
							printf("%d%c%d%c%d%c%d\n", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
							ok = true;
							goto end;
						}

						sprintf(str, "(%d%c%d)%c(%d%c%d)", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
						if (calc((string)str) == 10)
						{
							printf("(%d%c%d)%c(%d%c%d)\n", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
							ok = true;
							goto end;
						}


						sprintf(str, "(%d%c%d)%c%d%c%d", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
						if (calc((string)str) == 10)
						{
							printf("(%d%c%d)%c%d%c%d\n", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
							ok = true;

							goto end;
						}

						sprintf(str, "%d%c(%d%c%d)%c%d", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
						if (calc((string)str) == 10)
						{
							printf("%d%c(%d%c%d)%c%d\n", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
							ok = true;
							goto end;
						}

						sprintf(str, "%d%c%d%c(%d%c%d)", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
						if (calc((string)str) == 10)
						{
							printf("%d%c%d%c(%d%c%d)\n", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
							ok = true;
							goto end;
						}

						sprintf(str, "((%d%c%d)%c%d)%c%d", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
						if (calc((string)str) == 10)
						{
							printf("((%d%c%d)%c%d)%c%d\n", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
							ok = true;
							goto end;
						}
						sprintf(str, "(%d%c(%d%c%d))%c%d", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
						if (calc((string)str) == 10)
						{
							printf("(%d%c(%d%c%d))%c%d\n", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
							ok = true;
							goto end;
						}
						sprintf(str, "%d%c((%d%c%d)%c%d)", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
						if (calc((string)str) == 10)
						{
							printf("%d%c((%d%c%d)%c%d)\n", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
							ok = true;
							goto end;
						}

						sprintf(str, "%d%c(%d%c(%d%c%d))", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
						if (calc((string)str) == 10)
						{
							printf("%d%c(%d%c(%d%c%d))\n", a[0], op[i], a[1], op[l], a[2], op[k], a[3]);
							ok = true;
							goto end;
						}
					}
				}
			}
		} while (next_permutation(a.begin(), a.end()));
		; end:;
		if (!ok)
		{
			cout << 0 << endl;
		}
	}
}