#include <bits/stdc++.h>
using namespace std;
long long int a[300000], n, k, m, u = 0;
int se(int x) {
  u++;
  int r = 0;
  if (x == 0) {
    return -1;
  }
  if (a[x] == 1 || x == n - 1)
    r = se(x - 1);
  else {
    cout << "YES" << endl;
    for (int i = 1; i < x; i++) cout << a[i] << "->";
    cout << "(" << a[x] << "->";
    return 1;
  }
  if (r == -1) {
    return -1;
  } else if (u - 1 == r) {
    cout << "(" << a[x];
    for (int i = 1; i <= u; i++) cout << ")";
    return 1;
  } else {
    cout << "(" << a[x] << "->";
    return r + 1;
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  if (a[n] == 1) {
    cout << "NO";
    return 0;
  }
  if (n == 1) {
    if (a[n] == 0) {
      cout << "YES" << endl;
      cout << a[n];
    } else
      cout << "NO";
    return 0;
  }
  if (a[n] == 0 && a[n - 1] == 1) {
    cout << "YES" << endl;
    for (int i = 1; i < n; i++) cout << a[i] << "->";
    cout << a[n];
    return 0;
  }
  if (n == 2) {
    cout << "NO";
    return 0;
  }
  if (se(n - 1) == -1)
    cout << "NO";
  else {
    cout << "->" << a[n];
  }
  return 0;
}
