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