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