#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int a[maxn], s;
int n;
bool fun() {
  for (int i = n - 2; i >= 1; i--) {
    if (a[i] == 0) {
      s = i;
      return true;
    }
  }
  return false;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  if (n == 1 && a[n] == 0) {
    printf("YES\n0\n");
  } else if (a[n] == 1)
    puts("NO");
  else {
    if (a[n - 1] == 1) {
      puts("YES");
      int first = 0;
      for (int i = 1; i <= n; i++) {
        if (first)
          printf("->%d", a[i]);
        else {
          first = 1;
          printf("%d", a[i]);
        }
      }
      printf("\n");
    } else {
      if (fun()) {
        puts("YES");
        int first = 0;
        for (int i = 1; i <= n; i++) {
          if (first)
            printf("->");
          else
            first = 1;
          if (s == i) {
            printf("(%d", a[i]);
            for (int j = i + 1; j <= n - 1; j++) printf("->(%d", a[j]);
            for (; i <= n - 1; i++) printf(")");
            i--;
          } else
            printf("%d", a[i]);
        }
      } else
        puts("NO");
    }
  }
  return 0;
}
