#include <bits/stdc++.h>
using namespace std;
void fastStream() {
  cin.tie(0);
  std::ios_base::sync_with_stdio(0);
}
int N;
int A[100010];
int main() {
  fastStream();
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  if (A[N - 1] == 1) {
    cout << "NO" << endl;
  } else {
    if (N == 1) {
      cout << "YES" << endl;
      cout << 0 << endl;
    } else if (N == 2) {
      if (A[0] == 1 && A[1] == 0) {
        cout << "YES" << endl;
        cout << "1->0" << endl;
      } else {
        cout << "NO" << endl;
      }
    } else {
      if (A[N - 1] == 0 && A[N - 2] == 0) {
        bool ok = false;
        for (int i = 0; i < N - 2; i++) {
          if (A[i] == 0) {
            ok = true;
            break;
          }
        }
        if (!ok) {
          cout << "NO" << endl;
          return 0;
        }
      }
      cout << "YES" << endl;
      for (int i = 0; i < N - 2; i++) {
        cout << "(" << A[i] << "->";
      }
      cout << A[N - 2];
      for (int i = 0; i < N - 2; i++) cout << ")";
      cout << "->" << A[N - 1] << endl;
    }
  }
  return 0;
}
