#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 3e5 + 15;
int n, a[N];
string add(int l, int r) {
  if (l > r) return "";
  string res = "(";
  for (int j = l, ggdem = r; j < ggdem; j++)
    res += to_string(a[j]), res += "->";
  res += to_string(a[r]), res += ")";
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0, ggdem = n; i < ggdem; i++) cin >> a[i];
  if (a[n - 1] == 1) cout << "NO" << endl, exit(0);
  if (n == 1) cout << "YES" << endl << 0 << endl, exit(0);
  if (a[n - 2] == 1) {
    string res = add(0, n - 2);
    res += "->0";
    cout << "YES" << endl << res << endl, exit(0);
  }
  int val = 1;
  for (int i = 0, ggdem = n - 2; i < ggdem; i++) {
    if (val && !a[i])
      val = 0;
    else
      val = 1;
    if (!val) {
      string res;
      res += add(0, i);
      res += "->";
      res += add(i + 1, n - 2);
      res += "->0";
      cout << "YES" << endl << res << endl, exit(0);
    }
  }
  cout << "NO" << endl;
}
