#include <bits/stdc++.h>
using namespace std;
int n;
int arr[100010];
void solve() {
  if (arr[n] == 1) {
    printf("NO\n");
    return;
  }
  if (arr[n - 1] == 1) {
    printf("YES\n");
    printf("%d", arr[1]);
    for (int i = 2; i <= n; i++) printf("->%d", arr[i]);
    printf("\n");
    return;
  }
  if (n == 2) {
    printf("NO\n");
    return;
  }
  if (arr[n - 2] == 0) {
    printf("YES\n");
    if (n == 3) {
      printf("(%d->%d)->%d\n", arr[n - 2], arr[n - 1], arr[n]);
      return;
    }
    printf("%d", arr[1]);
    for (int i = 2; i <= n - 3; i++) printf("->%d", arr[i]);
    if (n != 3) printf("->(%d->%d)->%d\n", arr[n - 2], arr[n - 1], arr[n]);
    return;
  }
  int pos = n - 2;
  for (; pos >= 1; pos--) {
    if (arr[pos] == 0) break;
  }
  if (pos == 0) {
    printf("NO\n");
    return;
  } else if (pos == 1) {
    printf("YES\n");
    for (int i = 1; i <= n; i++) {
      if (i == pos)
        printf("(%d", arr[i]);
      else if (i == pos + 1)
        printf("->(%d", arr[i]);
      else if (i == n - 1)
        printf("->%d))", arr[i]);
      else
        printf("->%d", arr[i]);
    }
  } else {
    printf("YES\n%d", arr[1]);
    for (int i = 2; i <= n; i++) {
      if (i == pos)
        printf("->(%d", arr[i]);
      else if (i == pos + 1)
        printf("->(%d", arr[i]);
      else if (i == n - 1)
        printf("->%d))", arr[i]);
      else
        printf("->%d", arr[i]);
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  if (n == 1) {
    if (arr[1] == 0)
      printf("YES\n0\n");
    else
      printf("NO\n");
  } else
    solve();
}
