#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
bool a[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n == 1) {
    if (!a[0])
      cout << "YES\n0\n";
    else
      cout << "NO\n";
    return 0;
  }
  if (n == 2) {
    if (a[0] && !a[1])
      cout << "YES\n1->0\n";
    else
      cout << "NO\n";
    return 0;
  }
  if (a[n - 1]) {
    cout << "NO\n";
    return 0;
  }
  n--;
  if (a[n - 1]) {
    cout << "YES\n";
    for (int i = 0; i < n; i++) cout << a[i] << "->";
    cout << 0;
    return 0;
  }
  for (int i = 0; i < n - 1; i++)
    if (!a[i]) {
      cout << "YES\n";
      for (int j = 0; j < i; j++) cout << a[j] << "->";
      cout << "(0->(";
      for (int j = i + 1; j < n - 1; j++) cout << a[j] << "->";
      cout << a[n] << "))->0\n";
      return 0;
    }
  cout << "NO\n";
  return 0;
}
