#include <bits/stdc++.h>
using namespace std;
const long long inf = 1000000000000000000LL;
const double EPS = 1e-9;
const long long mod = 1000000007ll;
const int maxn = (int)100500 + 10;
int a[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = (1); i < (int)(n + 1); ++i) scanf("%d", &a[i]);
  if (a[n] == 1) {
    puts("NO");
    return 0;
  }
  if (n == 1) {
    puts("YES\n0");
    return 0;
  }
  if (a[n - 1] == 1) {
    puts("YES");
    for (int i = 1; i <= n; i++) printf("%d%s", a[i], (i == n) ? "" : "->");
    return 0;
  }
  if (n - 2 > 0 && a[n - 2] == 0) {
    puts("YES");
    for (int i = 1; i < n - 2; i++) printf("%d%s", a[i], "->");
    puts("(0->0)->0");
    return 0;
  }
  int zidx = -1;
  for (int i = n - 2; i >= 1; i--)
    if (a[i] == 0) {
      zidx = i;
      break;
    }
  if (zidx == -1) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (int i = 1; i < zidx; i++) printf("%d%s", a[i], "->");
  printf("(0->(");
  for (int i = zidx + 1;; i++)
    if (a[i] == 0)
      break;
    else
      printf("%d%s", a[i], a[i + 1] ? "->" : "");
  puts("->0))->0");
}
