#include <bits/stdc++.h>
using namespace std;
inline int implication(int a, int b) { return (a == 0 || b == 1); }
bool check(const vector<int>& a) {
  int n = a.size();
  if (a[n - 1] != 0) return false;
  if (n > 1) {
    int p = a[n - 2];
    for (int i = n - 3; i >= 0; --i) {
      p = implication(a[i], p);
    }
    return (p == 1);
  }
  return true;
}
void print_res(const vector<int>& a) {
  int n = a.size();
  for (int i = 0; i < n - 2; ++i) cout << "(" << a[i] << "->";
  if (n > 1) cout << a[n - 2];
  for (int i = 0; i < n - 2; ++i) cout << ")";
  if (n > 1) cout << "->";
  cout << a[n - 1] << endl;
}
int main() {
  int n;
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    int t;
    cin >> t;
    a.push_back(t);
  }
  if (check(a)) {
    cout << "YES" << endl;
    print_res(a);
  } else
    cout << "NO" << endl;
  return 0;
}
