#include <bits/stdc++.h>
int a[1000010];
int n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  if (n == 1) {
    if (a[1] == 0)
      printf("YES\n0");
    else
      printf("NO");
  } else if (a[n] == 1)
    printf("NO");
  else {
    if (a[n - 1] == 1) {
      printf("YES\n");
      for (int i = 1; i <= n; ++i) {
        printf("%d", a[i]);
        if (i < n) printf("->");
      }
    } else {
      bool flag = false;
      int i;
      for (i = n - 2; i >= 1; --i)
        if (a[i] == 0) {
          flag = true;
          break;
        }
      if (flag) {
        printf("YES\n");
        for (int j = 1; j <= n; ++j) {
          if (j == i) printf("(");
          if (j == i + 1) printf("(");
          printf("%d", a[j]);
          if (j == n - 1) printf("))");
          if (j < n) printf("->");
        }
      } else
        printf("NO");
    }
  }
  return 0;
}
