#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n;
int a[maxn];
int flag = 0;
int flag1 = 0;
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    if (i <= n - 1 && a[i] == 0) flag1 = 1;
  }
  if (a[n] == 0) flag = 1;
  if (flag) {
    if (flag1 == 0) {
      printf("YES\n");
      for (int i = 1; i <= n - 1; i++) {
        printf("%d->", a[i]);
      }
      printf("%d\n", a[n]);
      return 0;
    }
    int place = 0;
    for (int i = n - 2; i >= 1; i--) {
      if (a[i] == 0) {
        place = i;
        break;
      }
    }
    if (place == 0) {
      printf("NO\n");
      return 0;
    }
    printf("YES\n");
    for (int i = 1; i <= place - 1; i++) {
      printf("%d->", a[i]);
    }
    printf("(%d->", a[place]);
    printf("(");
    for (int i = place + 1; i <= n - 2; i++) {
      printf("%d->", a[i]);
    }
    printf("%d", a[n - 1]);
    printf("))->");
    printf("%d\n", a[n]);
  } else {
    printf("NO\n");
  }
  return 0;
}
