Implication is a function of two logical arguments, its value is false if and only if the value of the first argument is true and the value of the second argument is false. 

Implication is written by using character '<img align="middle" class="tex-formula" src="https://espresso.codeforces.com/70a0795f45d32287dba0eb83fc4a3f470c6e5537.png" style="max-width: 100.0%;max-height: 100.0%;"/>', and the arguments and the result of the implication are written as '0' (*false*) and '1' (*true*). According to the definition of the implication: 

<img align="middle" class="tex-formula" src="https://espresso.codeforces.com/5e89bebcd120e22a78239691c68ebf276013ef17.png" style="max-width: 100.0%;max-height: 100.0%;"/> 

<img align="middle" class="tex-formula" src="https://espresso.codeforces.com/af68c40058d777554c00a17c9b5595940af39c06.png" style="max-width: 100.0%;max-height: 100.0%;"/>

<img align="middle" class="tex-formula" src="https://espresso.codeforces.com/7251f8f04d377c9ab47f3d0e3a9f228b43e58504.png" style="max-width: 100.0%;max-height: 100.0%;"/> 

<img align="middle" class="tex-formula" src="https://espresso.codeforces.com/b2ab3ebfd5399daf3f3a0ae3fb89fe88e057c9d0.png" style="max-width: 100.0%;max-height: 100.0%;"/>

When a logical expression contains multiple implications, then when there are no brackets, it will be calculated from left to fight. For example,

<img align="middle" class="tex-formula" src="https://espresso.codeforces.com/c37e0d808ad6d8d62f84eebefa9c068efa4bfaf9.png" style="max-width: 100.0%;max-height: 100.0%;"/>. 

When there are brackets, we first calculate the expression in brackets. For example,

<img align="middle" class="tex-formula" src="https://espresso.codeforces.com/64fe2c9ef6920356045895e641e988348c80ed39.png" style="max-width: 100.0%;max-height: 100.0%;"/>.

For the given logical expression <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/c5d321568dee0b4f8cec503d24bd23b7ccf0dee2.png" style="max-width: 100.0%;max-height: 100.0%;"/> determine if it is possible to place there brackets so that the value of a logical expression is false. If it is possible, your task is to find such an arrangement of brackets.
The first line contains integer *n* (1 ≤ *n* ≤ 100 000) — the number of arguments in a logical expression.

The second line contains *n* numbers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (<img align="middle" class="tex-formula" src="https://espresso.codeforces.com/7bcdd7440cc300269a3395fa037d5af6351c3221.png" style="max-width: 100.0%;max-height: 100.0%;"/>), which means the values of arguments in the expression in the order they occur.
import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

n = int(input())
a = list(map(int, input().split()))
s = sum(a)
if a[-1] or not s:
    ans = ["NO"]
elif n == 1 or a[-2]:
    ans = ["YES", "->".join(map(str, a))]
elif not 0 in a[:-2]:
    ans = ["NO"]
else:
    b = [str(i) for i in a]
    i = -3
    while a[i]:
        b[i] = "(1"
        i -= 1
    b[i] = "(0"
    b[-2] = "0" + ")" * (-2 - i)
    ans = ["YES", "->".join(b)]
sys.stdout.write("\n".join(ans))