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