#include <bits/stdc++.h>
using namespace std;
int p[100000], n;
int check() {
  int one[50][50] = {0}, zero[50][50] = {0};
  for (int i = 0; i < n; i++)
    if (p[i] == 1)
      one[i][i] = 1;
    else
      zero[i][i] = 1;
  for (int l = 2; l <= n; l++)
    for (int i = 0; i + l <= n; i++)
      for (int j = i; j + 1 < i + l; j++) {
        zero[i][i + l - 1] = (one[i][j] & zero[j + 1][i + l - 1]);
        one[i][i + l - 1] = (one[i][j] & one[j + 1][i + l - 1]) |
                            (zero[i][j] & zero[j + 1][i + l - 1]) |
                            (zero[i][j] & one[j + 1][i + l - 1]);
      }
  return zero[0][n - 1];
}
int f() {
  int cnt = 0;
  for (int i = n - 1; i >= 0 && p[i] == 0; i--, cnt++)
    ;
  if (cnt == 0)
    printf("NO\n");
  else if (cnt == 1 || cnt > 2) {
    printf("YES\n");
    cnt = min(cnt, 3);
    for (int i = 0; i < n - cnt / 2; i++) printf("(");
    for (int i = 0; i < n - cnt; i++) printf("%d)->", p[i]);
    for (int i = 0; i < cnt / 2; i++) printf("(0->0))->");
    printf("0)");
    return 1;
  } else {
    int x;
    for (x = n - cnt - 1; x >= 0 && p[x] == 1; x--)
      ;
    if (x < 0) {
      printf("NO\n");
      return 0;
    }
    printf("YES\n");
    for (int i = 0; i < x + 2; i++) printf("(");
    for (int i = 0; i < x; i++) printf("%d)->", p[i]);
    printf("(0->(");
    for (int i = x + 1; i < n - cnt; i++) printf("1->(");
    printf("0");
    for (int i = 0; i < n - cnt - x + 2; i++) printf(")");
    printf("->0)");
    return 1;
  }
  return 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", p + i);
  f();
  return 0;
}
