#include <bits/stdc++.h>
using namespace std;
int buf[100100];
int bra[100100];
int main() {
  int n;
  int finger;
  int flag = 0;
  int braCnt = 0;
  int lookFor = 1;
  scanf("%d", &n);
  finger = n - 1;
  for (int i = 0; i < n; i++) {
    scanf("%d", buf + i);
  }
  if (buf[finger]) {
    printf("NO\n");
    return 0;
  }
  while (--finger >= 0) {
    if (buf[finger] == lookFor) {
      if (lookFor == 0) {
        bra[finger] = 1;
        braCnt++;
      }
      printf("YES\n");
      flag = 1;
      break;
    } else if (lookFor == 1) {
      lookFor = 0;
    } else {
      bra[finger] = 1;
      braCnt++;
    }
  }
  if (!flag && n > 1) {
    printf("NO\n");
  } else {
    if (n == 1) printf("YES\n");
    for (int i = 0; i < n - 1; i++) {
      if (bra[i]) putchar('(');
      putchar(buf[i] + '0');
      if (i == n - 2)
        while (braCnt--) putchar(')');
      printf("->");
    }
    printf("%d\n", buf[n - 1]);
  }
  return 0;
}
