#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:67108864")
using namespace std;
int n, a[200100], ans_op[200100], ans_cl[200100];
inline void bad() {
  puts("NO");
  exit(0);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  if ((n == 1 && a[0] == 0) || (n > 1 && a[n - 2] == 1 && a[n - 1] == 0)) {
    puts("YES");
    for (int i = 0; i < n; i++) {
      printf("%d", a[i]);
      if (i < n - 1) printf("->");
    }
    return 0;
  }
  if (n > 2 && a[n - 3] == 0 && a[n - 2] == 0 && a[n - 1] == 0) {
    puts("YES");
    for (int i = 0; i < n - 3; i++) printf("%d->", a[i]);
    printf("(0->0)->0");
    return 0;
  }
  if (n > 3 && a[n - 3] == 1 && a[n - 2] == 0 && a[n - 1] == 0) {
    int pos = -1;
    for (int i = n - 4; i >= 0; i--) {
      if (a[i] == 0) {
        pos = i;
        break;
      }
    }
    if (pos != -1) {
      puts("YES");
      for (int i = 0; i < pos; i++) printf("%d->", a[i]);
      printf("(0->(");
      for (int i = pos + 1; i < n - 2; i++) printf("1->");
      printf("0))->0");
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
