#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 9;
int n, b, a[N];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  if (a[n - 1] || (n == 2 && !a[0])) {
    cout << "NO\n";
    return 0;
  }
  if (n == 1) {
    cout << "YES\n0\n";
    return 0;
  }
  if (n == 2) {
    cout << "YES\n1->0\n";
    return 0;
  }
  if (n > 2 && a[n - 2] || (!a[n - 2] && !a[n - 3])) {
    cout << "YES\n";
    for (int i = 0; i < n - 3; i++) cout << a[i] << "->";
    cout << '(' << a[n - 3] << "->" << a[n - 2] << ")->0\n";
    return 0;
  }
  b = -1;
  for (int i = n - 3; i >= 0; i--)
    if (!a[i]) b = i;
  if (b < 0) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < b; i++) cout << a[i] << "->";
  cout << '(' << a[b] << "->(";
  for (int i = b + 1; i < n - 2; i++) cout << a[i] << "->";
  cout << a[n - 2] << "))->0\n";
}
