#include <bits/stdc++.h>
using namespace std;
int A[100005];
int main() {
  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 >= 3) {
      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 if (A[N - 3] == 0) {
        printf("YES\n");
        for (int i = 0; i < N - 3; i++) printf("%d->", A[i]);
        printf("(0->0)->0\n");
      } else {
        int flag = 1, x;
        for (int i = 0; i < N - 2; i++)
          if (A[i] == 0) {
            flag = 0;
            x = i;
          }
        if (flag)
          printf("NO\n");
        else {
          printf("YES\n");
          for (int i = 0; i < x; i++) printf("%d->", A[i]);
          printf("(0->(");
          for (int i = x + 1; A[i] == 1; i++) printf("1->");
          printf("0))->0");
        }
      }
    } else {
      if (N == 1) {
        printf("YES\n0\n");
      } else {
        if (A[0] == 1 && A[1] == 0)
          printf("YES\n1->0\n");
        else
          printf("NO\n");
      }
    }
  }
  return 0;
}
