#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
int a[MAXN];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  if (a[n - 1] == 1) {
    puts("NO");
  } else if ((n >= 2 && a[n - 2] == 1) || (n == 1 && a[n - 1] == 0)) {
    puts("YES");
    for (int i = 0; i < n; i++) {
      if (i) printf("->");
      printf("%d", a[i]);
    }
    putchar(10);
  } else {
    bool mt = false;
    int c = 0, pos = 0;
    int l, r;
    for (int i = n - 2; i >= 0 && c < 2; i--) {
      if (a[i] == 0)
        c++, pos = i;
      else if (a[i] == 1) {
        if (mt)
          l = i;
        else
          r = i, l = i;
        mt = true;
      }
    }
    if (c != 2) {
      puts("NO");
      return 0;
    } else
      puts("YES");
    if (mt) {
      for (int i = 0; i < n; i++) {
        if (i) printf("->");
        if (i == pos) putchar('(');
        if (i >= l && i <= r) putchar('(');
        printf("%d", a[i]);
        if (i == n - 2) {
          int v = r - l + 2;
          while (v--) {
            putchar(')');
          }
        }
      }
      putchar(10);
    } else {
      for (int i = 0; i < n; i++) {
        if (i) printf("->");
        if (i == n - 3) putchar('(');
        printf("%d", a[i]);
        if (i == n - 2) putchar(')');
      }
      putchar(10);
    }
  }
  return 0;
}
