#include <numeric>
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int r[4], p[4], a, b, c, d;

	while (true)
	{
		cin >> r[0] >> r[1] >> r[2] >> r[3];

		if (r[0] == 0 && r[1] == 0 && r[2] == 0 && r[3] == 0) { break; }

		iota(p, p + 4, 0);

		do
		{
			int a = r[p[0]], b = r[p[1]], c = r[p[2]], d = r[p[3]];

			if      (a + b + c + d == 10) { cout << a << " + " << b << " + " << c << " + " << d << endl; goto Exit; }
			else if (a + b + c - d == 10) { cout << a << " + " << b << " + " << c << " - " << d << endl; goto Exit; }
			else if (a + b - c - d == 10) { cout << a << " + " << b << " - " << c << " - " << d << endl; goto Exit; }
			else if (a * b + c + d == 10) { cout << a << " * " << b << " + " << c << " + " << d << endl; goto Exit; }
			else if (a * b + c - d == 10) { cout << a << " * " << b << " + " << c << " - " << d << endl; goto Exit; }
			else if (a * b - c - d == 10) { cout << a << " * " << b << " - " << c << " - " << d << endl; goto Exit; }
			else if (a - b * c + d == 10) { cout << a << " - " << b << " * " << c << " + " << d << endl; goto Exit; }
			else if (a * b + c * d == 10) { cout << a << " * " << b << " + " << c << " * " << d << endl; goto Exit; }
			else if (a * b - c * d == 10) { cout << a << " * " << b << " - " << c << " * " << d << endl; goto Exit; }
			else if (a * b * c + d == 10) { cout << a << " * " << b << " * " << c << " + " << d << endl; goto Exit; }
			else if (a * b * c - d == 10) { cout << a << " * " << b << " * " << c << " - " << d << endl; goto Exit; }
			else if (a * b * c * d == 10) { cout << a << " * " << b << " * " << c << " * " << d << endl; goto Exit; }
			else if ((a + b) * c + d == 10) { cout << "(" << a << " + " << b << ")" << " * " << c << " + " << d << endl; goto Exit; }
			else if ((a + b) * c - d == 10) { cout << "(" << a << " + " << b << ")" << " * " << c << " - " << d << endl; goto Exit; }
			else if ((a - b) * c + d == 10) { cout << "(" << a << " - " << b << ")" << " * " << c << " + " << d << endl; goto Exit; }
			else if ((a - b) * c - d == 10) { cout << "(" << a << " - " << b << ")" << " * " << c << " - " << d << endl; goto Exit; }
			else if ((a + b) * (c + d) == 10) { cout << "(" << a << " + " << b << ")" << " * " << "(" << c << " + " << d << ")" << endl; goto Exit; }
			else if ((a + b) * (c - d) == 10) { cout << "(" << a << " + " << b << ")" << " * " << "(" << c << " - " << d << ")" << endl; goto Exit; }
			else if ((a - b) * (c - d) == 10) { cout << "(" << a << " - " << b << ")" << " * " << "(" << c << " - " << d << ")" << endl; goto Exit; }

		} while (next_permutation(p, p + 4));

		cout << 0 << endl;

	Exit:;
	}

	return 0;
}