#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f, kMaxN = 1e5 + 5;
int a[kMaxN];
void NO() { cout << "NO\n"; }
int n;
void simple(int x = 0, int y = 0, int xx = 0, int yy = 0) {
  cout << "YES\n";
  for (int i = 1; i < n; ++i) {
    if (i == x) {
      cout << "(";
    }
    if (i == xx) {
      cout << "(";
    }
    cout << a[i];
    if (i == y) {
      cout << ")";
    }
    if (i == yy) {
      cout << ")";
    }
    cout << "->";
  }
  cout << a[n];
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  if (a[n] == 1) {
    NO();
    return 0;
  }
  if (n == 1) {
    simple();
    return 0;
  }
  if (a[n - 1] == 1) {
    simple();
    return 0;
  }
  if (a[n - 1] == 0) {
    if (n == 2) {
      NO();
      return 0;
    }
    if (a[n - 2] == 0) {
      simple(n - 2, n - 1);
      return 0;
    }
    int itr = n - 2;
    while (itr > 0 and a[itr] == 1) {
      --itr;
    }
    if (itr == 0) {
      NO();
      return 0;
    }
    simple(itr, n - 1, itr + 1, n - 1);
  }
  return 0;
}
