#include <bits/stdc++.h>
using namespace std;
int a[1000050];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.precision(11);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  if (a[n] != 0) {
    puts("NO");
    return 0;
  }
  if (n == 1) {
    cout << "YES\n0\n";
    return 0;
  }
  if (a[n - 1] == 1) {
    cout << "YES\n";
    for (int i = 1; i <= n; i++) {
      cout << a[i] << (i == n ? "\n" : "->");
    }
    return 0;
  }
  for (int i = n - 2; i >= 1; i--) {
    if (a[i] == 0) {
      cout << "YES\n";
      for (int j = 1; j <= i - 1; j++) {
        cout << a[j] << "->";
      }
      cout << "(0->(";
      for (int j = i + 1; j <= n - 2; j++) {
        cout << "1->";
      }
      cout << "0))->0\n";
      return 0;
    }
  }
  cout << "NO\n";
}
