#include <bits/stdc++.h>
using namespace std;
int a[100001];
int main() {
  int n, i, j, fl;
  cin >> n;
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  if (a[n - 1] == 1) {
    cout << "NO" << endl;
    return 0;
  }
  fl = 0;
  for (i = 0; i < (n - 2); i++)
    if (a[i] == 0) fl = 1;
  if (a[n - 2] == 1 || (n == 1 && a[n - 1] == 0)) {
    cout << "YES" << endl;
    for (i = 0; i < n - 1; i++) cout << a[i] << "->";
    cout << a[n - 1] << endl;
    return 0;
  }
  if (fl == 0) {
    cout << "NO" << endl;
    return 0;
  }
  fl = n;
  for (i = n - 3; i >= 0; i--)
    if (a[i] == 0) {
      fl = i;
      break;
    }
  cout << "YES" << endl;
  if (fl == n) {
    for (i = 0; i < n - 1; i++) cout << a[i] << "->";
    cout << a[i] << endl;
    return 0;
  }
  i = 0;
  while (i < fl) {
    cout << a[i] << "->";
    i++;
  }
  cout << "(" << a[i] << "->(";
  for (i = fl + 1; i < n - 2; i++) cout << a[i] << "->";
  cout << a[i] << "))->" << a[i + 1] << endl;
  return 0;
}
