#include <bits/stdc++.h>
int a[101111], n;
int imply(int a, int b) { return !a || (a & b); }
int main() {
  int res;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  if (n == 1) {
    if (a[n - 1] == 0) {
      printf("YES\n0\n");
    } else
      printf("NO\n");
  } else if (a[n - 1] == 0) {
    if (a[n - 2] == 0) {
      int ni = -1;
      for (int i = 0; i < n - 2; i++)
        if (a[i] == 0) ni = i;
      if (ni == -1) {
        printf("NO\n");
        return 0;
      }
      printf("YES\n");
      for (int i = 0; i < ni; i++) {
        printf("%d->", a[i]);
      }
      printf("(0->(");
      for (int i = ni + 1; i < n - 1; i++) {
        if (i != ni + 1) printf("->");
        printf("%d", a[i]);
      }
      printf("))->%d\n", a[n - 1]);
    } else {
      printf("YES\n");
      for (int i = 0; i < n; i++) {
        if (i) printf("->");
        printf("%d", a[i]);
      }
    }
  } else {
    printf("NO\n");
    return 0;
  }
}
