#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100010];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 1 && a[0] == 0) {
    cout << "YES" << endl << "0";
    return 0;
  }
  if (a[n - 1] == 1) {
    cout << "NO";
    return 0;
  }
  bool is_z = false, is_o = true;
  if (a[n - 1] == 0 && a[n - 2] == 0) is_z = true;
  for (int i = n - 3; i > -1; i--) {
    if (a[i] != 1) is_o = false;
  }
  if (is_z && is_o) {
    cout << "NO";
    return 0;
  }
  if (!is_z) {
    cout << "YES" << endl;
    string ans = "";
    ans += a[0] + '0';
    for (int i = 1; i < n; i++) {
      ans += "->";
      ans += (char)(a[i] + '0');
    }
    cout << ans;
    return 0;
  } else {
    cout << "YES" << endl;
    string ans = "";
    int l1, l2, r2 = n - 1, r1 = n - 1;
    for (int i = n - 3; i > -1; i--) {
      if (a[i] == 0) {
        l1 = i;
        l2 = i + 1;
        break;
      }
    }
    for (int i = 0; i < n - 1; i++) {
      if (i == l2 || i == l1) ans += '(';
      ans += (char)(a[i] + '0');
      if (i == n - 2) ans += "))";
      ans += "->";
    }
    ans += '0';
    cout << ans;
  }
  return 0;
}
