#include <bits/stdc++.h>
using namespace std;
void print(int l, int r, int *a) {
  for (int i = l; i < r; i++) {
    cout << a[i] << "->";
  }
  if (r >= l) cout << a[r];
}
int main() {
  int n;
  cin >> n;
  int a[n];
  int count = 0;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 0) v.push_back(i), count++;
  }
  if (n == 1) {
    if (a[0] == 0)
      cout << "YES" << endl << 0;
    else
      cout << "NO" << endl;
    return 0;
  }
  if (a[n - 1] == 1) {
    cout << "NO" << endl;
    return 0;
  }
  if (a[n - 2] == 1) {
    cout << "YES" << endl, print(0, n - 1, a);
    return 0;
  }
  if (count > 2) {
    if (a[n - 3] != a[n - 2] or a[n - 2] == 1) {
      cout << "YES" << endl;
      print(0, v[v.size() - 3] - 1, a);
      if (v[v.size() - 3]) cout << "->";
      cout << "(";
      cout << a[v[v.size() - 3]] << "->(";
      print(v[v.size() - 3] + 1, v[v.size() - 2], a);
      cout << "))->" << 0;
    } else {
      cout << "YES" << endl;
      print(0, n - 4, a);
      if (n > 3) cout << "->";
      cout << "(";
      cout << a[n - 3] << "->" << a[n - 2] << ")->" << a[n - 1];
    }
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
