#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int n;
bool a[100000];
int le[100000];
int ri[100000];
vector<int> zero;
void solve() {
  memset(le, 0, sizeof(le));
  memset(ri, 0, sizeof(ri));
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  if (a[n - 1] == 1) {
    cout << "NO";
    return;
  }
  int cnt = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] == 0) {
      cnt++;
      zero.push_back(i);
    } else {
      if (cnt & 1) break;
      bool check = true;
      for (int j = i + 1 - 1; j >= 0; j--) {
        if (a[j] == 0) {
          ri[i + 1]++;
          le[j + 1]++;
          i = j + 1;
          check = false;
          break;
        }
      }
      if (check) {
        if (cnt == 3) {
          le[zero[2]]++;
          ri[zero[1]]++;
        }
        break;
      }
    }
    if (cnt == 3) {
      le[zero[2]]++;
      ri[zero[1]]++;
      break;
    }
  }
  if (cnt & 1) {
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      if (i > 0) cout << "->";
      while (le[i]--) cout << "(";
      cout << a[i];
      while (ri[i]--) cout << ")";
    }
  } else
    cout << "NO";
}
int main() {
  solve();
  return 0;
}
