#include <bits/stdc++.h>
using namespace std;
int N;
int A[200000];
int main() {
  scanf("%d", &N);
  int cnt = 0, sum = 0;
  for (int Ni = 0; Ni < N; Ni++) {
    scanf("%d", &A[Ni]);
    if (A[Ni] == 0)
      cnt++, sum++;
    else
      cnt = 0;
  }
  if (cnt == 1) {
    puts("YES");
    for (int Ni = 0; Ni < N; Ni++) {
      if (Ni != 0) printf("->");
      printf("%d", A[Ni]);
    }
    puts("");
    return 0;
  }
  if (cnt >= 2 && sum >= 3) {
    puts("YES");
    int p;
    for (int Ni = N - 3; Ni >= 0; Ni--)
      if (A[Ni] == 0) {
        p = Ni;
        break;
      }
    for (int Ni = 0; Ni < N; Ni++) {
      if (Ni != 0) printf("->");
      if (Ni >= p && Ni <= N - 3) printf("(");
      printf("%d", A[Ni]);
      if (Ni == N - 2) {
        for (int Nj = p; Nj <= N - 3; Nj++) printf(")");
      }
    }
    puts("");
    return 0;
  }
  puts("NO");
}
