#include <iostream>
#include <string>
#include <vector>
#include <cstring>
#include <sstream>
using namespace std;

int a[4];
bool used[4];
string ans;

string toStr(int x) {
    stringstream ss;
    ss << x;
    return ss.str();
}

void dfs(int res, string s) {
    bool last = true;
    for (int i=0; i<4; ++i) {
        if (used[i]) continue;
        used[i] = true;
        dfs(res + a[i], "(" + s + " + " + toStr(a[i]) + ")");
        dfs(res - a[i], "(" + s + " - " + toStr(a[i]) + ")");
        dfs(res * a[i], "(" + s + " * " + toStr(a[i]) + ")");
        for (int j=i+1; j<4; ++j) {
            if (used[j]) continue;
            used[j] = true;
            dfs(res + (a[i] + a[j]), "(" + s + " + (" + toStr(a[i]) + " + " + toStr(a[j]) + "))");
            dfs(res + (a[i] - a[j]), "(" + s + " + (" + toStr(a[i]) + " - " + toStr(a[j]) + "))");
            dfs(res + (a[i] * a[j]), "(" + s + " + (" + toStr(a[i]) + " * " + toStr(a[j]) + "))");
            dfs(res - (a[i] + a[j]), "(" + s + " - (" + toStr(a[i]) + " + " + toStr(a[j]) + "))");
            dfs(res - (a[i] - a[j]), "(" + s + " - (" + toStr(a[i]) + " - " + toStr(a[j]) + "))");
            dfs(res - (a[i] * a[j]), "(" + s + " - (" + toStr(a[i]) + " * " + toStr(a[j]) + "))");
            dfs(res * (a[i] + a[j]), "(" + s + " * (" + toStr(a[i]) + " + " + toStr(a[j]) + "))");
            dfs(res * (a[i] - a[j]), "(" + s + " * (" + toStr(a[i]) + " - " + toStr(a[j]) + "))");
            dfs(res * (a[i] * a[j]), "(" + s + " * (" + toStr(a[i]) + " * " + toStr(a[j]) + "))");
            used[j] = false;
        }
        used[i] = false;
        last = false;
    }
    if (last && res == 10) {
        ans = s;
    }
}

int main() {
    while (cin >> a[0] >> a[1] >> a[2] >> a[3], (a[0] || a[1] || a[2] || a[3])) {
        ans = "0";
        memset(used, false, sizeof used);
        for (int i=0; i<4; ++i) {
            used[i] = true;
            dfs(a[i], toStr(a[i]));
            used[i] = false;
        }
        cout << ans << endl;
    }
    return 0;
}