#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
int n;
int a[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  int k = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] == 1) break;
    k++;
  }
  if (k == 0)
    puts("NO");
  else if (k == 1) {
    puts("YES");
    for (int i = 0; i < n; i++) {
      if (i) printf("->");
      printf("%d", a[i]);
    }
    puts("");
  } else if (k == 2) {
    int idx = -1;
    for (int i = n - 3; i >= 0; i--)
      if (a[i] == 0) {
        idx = i;
        break;
      }
    if (~idx) {
      puts("YES");
      for (int i = 0; i < idx; i++) {
        if (i) printf("->");
        printf("%d", a[i]);
      }
      if (idx) printf("->");
      printf("(%d", a[idx]);
      for (int i = idx + 1; i < n - 1; i++) {
        printf("->");
        if (i == idx + 1) printf("(");
        printf("%d", a[i]);
        if (i == n - 2) printf(")");
      }
      printf(")->0\n");
    } else
      puts("NO");
  } else {
    puts("YES");
    for (int i = 0; i < n - 3; i++) {
      if (i) printf("->");
      printf("%d", a[i]);
    }
    if (n - 3) printf("->");
    printf("(0->0)->0\n");
  }
}
