#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
int n;
int a[N];
int sum[N];
inline bool check() {
  if (a[n] != 0) return true;
  if (n == 2 && (a[1] != 1 || a[2] != 0)) return true;
  if (a[n] == 0 && a[n - 1] == 1) return false;
  if (sum[n - 2] == n - 2) return true;
  return false;
}
inline void Work1() {
  printf("0\n");
  exit(0);
}
inline void Work2() {
  printf("1->0\n");
  exit(0);
}
inline void Work3() {
  for (int i = 1; i <= n - 1; i++) printf("%d->", a[i]);
  printf("%d\n", a[n]);
  exit(0);
}
inline void Work4() {
  int place;
  for (int i = n - 2; i >= 1; i--)
    if (a[i] == 0) {
      place = i;
      break;
    }
  for (int i = 1; i <= place - 1; i++) printf("%d->", a[i]);
  for (int i = place; i <= n - 2; i++) printf("(%d->", a[i]);
  printf("%d", a[n - 1]);
  int len = n - 1 - place;
  for (int i = 1; i <= len; i++) printf(")");
  printf("->%d\n", a[n]);
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    sum[i] = sum[i - 1] + a[i];
  }
  if (check()) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  if (n == 1) Work1();
  if (n == 2) Work2();
  if (a[n - 1] == 1) Work3();
  Work4();
  return 0;
}
