#include <bits/stdc++.h>
using namespace std;
int n, a[100005];
int main() {
  cin >> n;
  for (int i = (1), _b = (n); i <= _b; i++) cin >> a[i];
  if (n == 1 && a[n] == 0) {
    cout << "YES" << endl;
    cout << 0;
    return 0;
  }
  if (a[n] == 1) {
    cout << "NO" << endl;
    return 0;
  }
  if (n >= 2 && a[n] == 0 && a[n - 1] == 1) {
    cout << "YES" << endl;
    cout << a[1];
    for (int j = (2), _b = (n); j <= _b; j++) cout << "->" << a[j];
    return 0;
  }
  for (int i = (n - 2), _b = (1); i >= _b; i--)
    if (a[i] == 0) {
      cout << "YES" << endl;
      for (int j = (1), _b = (i - 1); j <= _b; j++) cout << a[j] << "->";
      for (int j = (i), _b = (n - 2); j <= _b; j++) cout << "(" << a[j] << "->";
      cout << a[n - 1];
      for (int j = (1), _b = (n - 1 - i); j <= _b; j++) cout << ")";
      cout << "->0";
      return 0;
    }
  cout << "NO";
}
