#include <bits/stdc++.h>
using namespace std;
int A[100005];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &A[i]);
  }
  if (A[n - 1] == 1)
    printf("NO\n");
  else if (n == 1) {
    printf("YES\n");
    printf("0\n");
  } else if (n == 2) {
    if (A[0] == 1) {
      printf("YES\n");
      printf("1->0\n");
    } else {
      printf("NO\n");
    }
  } else {
    if (A[n - 2] == 1) {
      printf("YES\n");
      for (int i = 0; i < n - 1; ++i) {
        printf("%d->", A[i]);
      }
      printf("%d\n", A[n - 1]);
    } else {
      bool found = false;
      for (int i = 0; i < n - 2; ++i) {
        if (A[i] == 0) found = true;
      }
      if (found) {
        printf("YES\n");
        bool started = false;
        for (int i = 0; i < n - 2; ++i) {
          if (A[i] == 0 && !started) {
            printf("%d->(", A[i]);
            started = true;
          } else
            printf("%d->", A[i]);
        }
        printf("%d)->%d", A[n - 2], A[n - 1]);
      } else {
        printf("NO\n");
      }
    }
  }
  return 0;
}
