using System;
using System.Linq;

namespace Volumen0
{
    class Program
    {
        static void Main()
        {
            string line;
            while ((line = Console.In.ReadLine()) != "0 0 0 0")
            {
                var s = line.Split().Select(x => int.Parse(x)).ToArray();
                Expression(s);
            }
        }

        static void Expression(int[] s)
        {
            const int NUMS = 4;
            for (int a = 0; a < NUMS; ++a)
            {
                for (int b = 0; b < NUMS; ++b)
                {
                    if (a != b)
                    {
                        for (int c = 0; c < NUMS; ++c)
                        {
                            if ((a != c) && (b != c))
                            {
                                for (int d = 0; d < NUMS; ++d)
                                {
                                    if ((a != d) && (b != d) && (c != d))
                                    {
                                        if (PatternA(s[a], s[b], s[c], s[d]))
                                            return;
                                        else if (PatternB(s[a], s[b], s[c], s[d]))
                                            return;
                                    }
                                }
                            }
                        }
                    }
                }
            }
            Console.WriteLine(0);
        }


        static bool PatternA(int a, int b, int c, int d)
        {
            char[] op = { '+', '-', '*' };

            for (int frag1 = 0; frag1 < op.Length; ++frag1)
            {
                for (int frag2 = 0; frag2 < op.Length; ++frag2)
                {
                    for (int frag3 = 0; frag3 < op.Length; ++frag3)
                    {
                        int ans = 0;
                        if (frag1 == 0)
                        {
                            ans += a + b;
                        }
                        else if (frag1 == 1)
                        {
                            ans += a - b;
                        }
                        else if (frag1 == 2)
                        {
                            ans += a * b;
                        }
                        if (frag2 == 0)
                        {
                            ans += c;
                        }
                        else if (frag2 == 1)
                        {
                            ans -= c;
                        }
                        else if (frag2 == 2)
                        {
                            ans *= c;
                        }
                        if (frag3 == 0)
                        {
                            ans += d;
                        }
                        else if (frag3 == 1)
                        {
                            ans -= d;
                        }
                        else if (frag3 == 2)
                        {
                            ans *= d;
                        }
                        if (ans == 10)
                        {
                            Console.WriteLine("(({0}{1}{2}){3}{4}){5}{6}", a, op[frag1], b, op[frag2], c, op[frag3], d);
                            return true;
                        }
                    }
                }
            }
            return false;
        }


        static bool PatternB(int a, int b, int c, int d)
        {
            char[] op = { '+', '-', '*' };

            for (int frag1 = 0; frag1 < op.Length; frag1++)
            {
                for (int frag2 = 0; frag2 < op.Length; frag2++)
                {
                    for (int frag3 = 0; frag3 < op.Length; frag3++)
                    {
                        int ans = 0;
                        if (frag1 == 0)
                        {
                            ans += a + b;
                        }
                        else if (frag1 == 1)
                        {
                            ans += a - b;
                        }
                        else if (frag1 == 2)
                        {
                            ans += a * b;
                        }
                        int tmp = 0;
                        if (frag3 == 0)
                        {
                            tmp += c + d;
                        }
                        else if (frag3 == 1)
                        {
                            tmp += c - d;
                        }
                        else if (frag3 == 2)
                        {
                            tmp += c * d;
                        }
                        if (frag2 == 0)
                        {
                            ans += tmp;
                        }
                        else if (frag2 == 1)
                        {
                            ans -= tmp;
                        }
                        else  if (frag2 == 2)
                        {
                            ans *= tmp;
                        }
                        if (ans == 10)
                        {
                            Console.WriteLine("({0}{1}{2}){3}({4}{5}{6})", a, op[frag1], b, op[frag2], c, op[frag3], d);
                            return true;
                        }
                    }
                }
            }
            return false;
        }
    }
}


Measured memory_bytes: 14332