#include <bits/stdc++.h>
using namespace std;
int n;
int a[100100], cnt1, l[100100], r[100100];
int cnt = 0;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 0) cnt++;
  }
  if (a[n]) {
    puts("NO");
    return 0;
  }
  if (cnt & 1) {
    int i, j;
    for (i = 1, j = 1; i < n; i++) {
      if (a[i] == 0) {
        ++cnt1;
        if (cnt1 & 1)
          l[j]++;
        else
          r[i]++;
        l[j]++;
        r[i]++;
        j = i + 1;
      }
    }
    puts("YES");
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= l[i]; j++) printf("(");
      printf("%d", a[i]);
      for (j = 1; j <= r[i]; j++) printf(")");
      if (i != n) printf("->");
    }
  } else {
    if (a[n - 1]) {
      puts("YES");
      for (int i = 1; i <= n; i++) {
        printf("%d", a[i]);
        if (i != n) printf("->");
      }
      return 0;
    }
    if (cnt == 2 && !a[n - 1]) {
      puts("NO");
      return 0;
    }
    cnt1 = 0;
    for (int t = 1, k = 1; t < n; t++) {
      if (a[t] == 0) {
        ++cnt1;
        l[k]++;
        r[t]++;
        if (cnt1 == 2) l[k]++;
        if (cnt1 != 3) {
          k = t + 1;
        } else {
          r[t]++;
          cnt1 = 1;
          for (int i = t + 1, j = t + 1; i < n; i++) {
            if (a[i] == 0) {
              ++cnt1;
              if ((cnt1 & 1) == 0)
                l[j]++;
              else
                r[i]++;
              l[j]++;
              r[i]++;
              j = i + 1;
            }
          }
          puts("YES");
          for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= l[i]; j++) printf("(");
            printf("%d", a[i]);
            for (int j = 1; j <= r[i]; j++) printf(")");
            if (i != n) printf("->");
          }
          return 0;
        }
      }
    }
    puts("NO");
  }
  return 0;
}
