#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 5;
int a[MAX_N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  if (n == 1) {
    if (a[1] == 0)
      cout << "YES" << endl << "0" << endl;
    else
      cout << "NO" << endl;
  } else if (n == 2) {
    if (a[2] == 0 && a[1] == 1)
      cout << "YES" << endl << a[1] << "->" << a[2] << endl;
    else
      cout << "NO" << endl;
  } else {
    if (a[n] == 0) {
      if (a[n - 1] == 1) {
        cout << "YES" << endl << "(" << a[1];
        for (int i = 2; i < n; i++) {
          cout << "->" << a[i];
        }
        cout << ")->" << a[n] << endl;
      } else if (a[n - 1] == 0 && a[n - 2] == 0) {
        cout << "YES" << endl;
        if (n > 3) cout << a[1] << "->";
        for (int i = 2; i < n - 2; i++) {
          cout << a[i] << "->";
        }
        cout << "(0->0)->" << a[n] << endl;
      } else if (a[n - 1] == 0) {
        int last0 = -1;
        for (int i = n - 2; i >= 1; i--) {
          if (a[i] == 0) {
            last0 = i;
            break;
          }
        }
        if (last0 == -1)
          cout << "NO" << endl;
        else {
          cout << "YES" << endl;
          for (int i = 1; i < last0; i++) {
            cout << a[i] << "->";
          }
          cout << "(" << a[last0] << "->(";
          for (int i = last0 + 1; i < n - 1; i++) {
            cout << a[i] << "->";
          }
          cout << a[n - 1] << "))->0" << endl;
        }
      } else
        cout << "NO" << endl;
    } else
      cout << "NO" << endl;
  }
  for (int i = 0; i < n; i++) {
  }
  return 0;
}
