#include <bits/stdc++.h>
using namespace std;
int n;
int a[int(1e5) + 10];
int sum(int *a, int n) {
  int res = 0;
  for (int i = 0; i < n; i++) res += a[i];
  return res;
}
void print(int *a, int n) {
  for (int i = 0; i < n - 1; i++) printf("%d->", a[i]);
  if (n > 0) printf("%d", a[n - 1]);
}
int main(void) {
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  if (a[n - 1] == 1) {
    cout << "NO";
    return 0;
  }
  if (n == 1) {
    cout << "YES\n0";
    return 0;
  }
  if (n == 2) {
    if (a[0] == 1 && a[1] == 0)
      cout << "YES\n1->0";
    else
      cout << "NO";
    return 0;
  }
  if (a[n - 2] == 0 && sum(a, n - 2) == n - 2) {
    cout << "NO";
    return 0;
  }
  if (sum(a, n - 1) == n - 1) {
    cout << "YES\n";
    print(a, n);
    return 0;
  }
  cout << "YES\n";
  int pos = -1;
  for (int i = 0; i < n - 2; i++)
    if (a[i] == 0) {
      pos = i;
      break;
    }
  print(a, pos);
  if (pos > 0)
    cout << "->(0->(";
  else
    cout << "(0->(";
  print(a + pos + 1, n - pos - 2);
  cout << "))->" << a[n - 1];
  return 0;
}
