#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
int s[maxn];
int main() {
  int siz;
  while (~scanf("%d", &siz)) {
    for (int i = 0; i < siz; i++) scanf("%d", &s[i]);
    if (s[siz - 1] != 0) {
      puts("NO");
      continue;
    }
    if (siz == 1) {
      puts("YES");
      puts("0");
      continue;
    }
    if (siz == 2) {
      if (s[0] == 1) {
        puts("YES");
        puts("1->0");
        continue;
      }
      puts("NO");
      continue;
    }
    int can = 0, pre = s[siz - 2];
    if (pre == 1)
      can = 1;
    else
      for (int i = siz - 3; i >= 0; i--) {
        if (s[i] == 1 && pre == 0) {
        } else {
          can = 1;
          break;
        }
      }
    if (!can)
      puts("NO");
    else {
      puts("YES");
      for (int i = 0; i < siz - 2; i++) {
        printf("(%d->", s[i]);
      }
      printf("%d", s[siz - 2]);
      for (int i = 0; i < siz - 2; i++) printf(")");
      puts("->0");
    }
  }
}
