#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n;
int ori[maxn];
void show(int st, int ed) {
  for (int i = st; i <= ed; i++) {
    if (i > st) cout << "->";
    cout << ori[i];
  }
}
int main() {
  while (cin >> n) {
    for (int i = 1; i <= n; i++) scanf("%d", ori + i);
    if (ori[n] != 0) {
      cout << "NO\n";
      continue;
    }
    int pos = -1;
    for (int i = n - 1; i >= 1; i--)
      if (ori[i] == 0) {
        pos = i;
        break;
      }
    if (pos == -1) {
      cout << "YES\n";
      show(1, n);
      cout << endl;
    } else {
      if (pos == n - 1) {
        int find = -1;
        for (int i = n - 2; i >= 1; i--)
          if (ori[i] == 0) {
            find = i;
            break;
          }
        if (find == -1) {
          cout << "NO\n";
        } else {
          if (find + 1 == pos) {
            cout << "YES\n";
            show(1, find - 1);
            if (find != 1) cout << "->";
            cout << "(";
            show(find, pos);
            cout << ")->" << ori[n] << endl;
          } else {
            cout << "YES\n";
            show(1, find - 1);
            if (find != 1) cout << "->";
            cout << "(";
            cout << ori[find] << "->(";
            show(find + 1, pos);
            cout << "))->" << ori[n] << endl;
          }
        }
      } else {
        cout << "YES\n";
        show(1, n);
        cout << endl;
      }
    }
  }
}
