#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int a[MAXN];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  if (a[n] == 1) {
    printf("NO\n");
    return 0;
  }
  if (n == 1) {
    if (a[1] == 0)
      printf("YES\n0\n");
    else
      printf("NO\n");
    return 0;
  }
  if (n == 2) {
    if (a[1] == 1 && a[2] == 0)
      printf("YES\n1->0\n");
    else
      printf("NO\n");
    return 0;
  }
  int ok = 0;
  for (int i = n; i >= 1; i--)
    if (a[i] == 1) {
      ok = i;
      break;
    }
  if (n - ok >= 3) {
    printf("YES\n");
    for (int i = 1; i <= n - 3; i++) printf("%d->", a[i]);
    printf("(0->0)->0\n");
    return 0;
  }
  if (n - ok == 2) {
    int ok2 = 0;
    for (int i = ok; i >= 1; i--) {
      if (a[i] == 0) {
        ok2 = i;
        break;
      }
    }
    if (ok2 == 0) {
      printf("NO\n");
      return 0;
    }
    printf("YES\n");
    for (int i = 1; i < ok2; i++) printf("%d->", a[i]);
    printf("(0->((");
    for (int i = ok2 + 1; a[i] != 0; i++) {
      if (a[i + 1] == 0)
        printf("%d", a[i]);
      else
        printf("%d->", a[i]);
    }
    printf(")->0))->0\n");
    return 0;
  }
  printf("YES\n");
  for (int i = 1; i < n; i++) printf("%d->", a[i]);
  printf("0\n");
  return 0;
}
