#include <bits/stdc++.h>
using namespace std;
const int MXN = (int)2e6 + 10;
const int INF = (int)1e9 + 7;
const double EPS = (double)1e-9;
int n;
int a[MXN];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  if (a[n - 1]) {
    cout << "NO";
    return 0;
  }
  if (n == 1) {
    cout << "YES\n0";
    return 0;
  }
  if (a[n - 2]) {
    cout << "YES\n";
    for (int i = 0; i < n - 1; ++i) {
      cout << a[i] << "->";
    }
    cout << a[n - 1];
    return 0;
  }
  if (n > 2 && !a[n - 2] && !a[n - 3]) {
    cout << "YES\n";
    for (int i = 0; i < n - 3; ++i) {
      cout << a[i] << "->";
    }
    cout << "(0->0)->0";
    return 0;
  }
  if (n > 3 && !a[n - 4] && a[n - 3] && !a[n - 2]) {
    cout << "YES\n";
    for (int i = 0; i < n - 4; ++i) {
      cout << a[i] << "->";
    }
    cout << "(0->(1->0))->0";
    return 0;
  }
  if (n > 2 && !a[n - 2] && a[n - 3]) {
    int cur = -1;
    for (int i = n - 3; i >= 0; --i) {
      if (!a[i]) {
        cur = i;
        break;
      }
    }
    if (cur == -1) {
      cout << "NO";
      return 0;
    }
    cout << "YES\n";
    for (int i = 0; i < cur; ++i) {
      cout << a[i] << "->";
    }
    cout << "(0->(";
    for (int i = cur + 1; i < n - 2; ++i) {
      cout << a[i] << "->";
    }
    cout << "0))->0";
    return 0;
  }
  cout << "NO";
  return 0;
}
