#include <bits/stdc++.h>
using namespace std;
int n, uno, beg, imp[1000010];
void magic() {
  cout << "(";
  if (uno != -1 && uno != 0) {
    for (int(i) = (int)(0); (i) < (int)(uno); (i)++) {
      cout << "(";
    }
    cout << imp[0] << "->";
    for (int(i) = (int)(1); (i) < (int)(uno); (i)++) {
      cout << imp[i] << ")->";
    }
    cout << imp[uno] << ")";
    beg = uno + 1;
  } else if (uno == 0) {
    cout << "1->";
    beg = 1;
  } else
    beg = 0;
  if (n - beg == 1)
    cout << "->0)\n";
  else {
    if (uno != 0 && uno != -1) cout << "->";
    for (int(i) = (int)(beg); (i) < (int)(n - 4); (i)++) {
      cout << "(";
    }
    if (n - beg > 4) {
      cout << "0->";
      beg++;
    } else if (n - beg == 4) {
      cout << "0->";
      beg = beg + 2;
    }
    for (int(i) = (int)(beg); (i) < (int)(n - 3); (i)++) {
      cout << "0)->";
    }
    cout << "(0->0)->0)\n";
  }
}
void magic2() {
  int cer = -1;
  if (n == 3)
    cout << "NO\n";
  else {
    for (int(i) = (int)(0); (i) < (int)(uno); (i)++)
      if (imp[i] == 0) cer = i;
    if (cer == -1)
      cout << "NO\n";
    else {
      cout << "YES\n";
      if (cer > 1) {
        cout << "(";
        for (int(i) = (int)(0); (i) < (int)(cer - 1); (i)++)
          cout << imp[i] << "->";
        cout << imp[cer - 1] << ")->";
      } else if (cer == 1) {
        cout << imp[0] << "->";
      }
      cout << "(" << imp[cer] << "->(";
      if (cer == n - 4)
        cout << "1->0))->0\n";
      else {
        for (int(i) = (int)(cer + 1); (i) < (int)(n - 4); (i)++) {
          cout << imp[i] << "->";
        }
        cout << imp[n - 4] << "->1->0))->0\n";
      }
    }
  }
}
int main() {
  while (cin >> n) {
    uno = -1;
    for (int(i) = (int)(0); (i) < (int)(n); (i)++) {
      cin >> imp[i];
      if (imp[i] == 1) {
        uno = i;
      }
    }
    if (n == 1) {
      if (imp[0] == 1)
        cout << "NO\n";
      else {
        cout << "YES\n";
        cout << "0\n";
      }
    } else if (n == 2) {
      if (imp[0] == 1 && imp[1] == 0) {
        cout << "YES\n";
        cout << "(1->0)\n";
      } else {
        cout << "NO\n";
      }
    } else if (imp[n - 1] == 1)
      cout << "NO\n";
    else if (imp[n - 2] == 1) {
      cout << "YES\n";
      magic();
    } else if (imp[n - 2] == 0 && imp[n - 3] == 1) {
      magic2();
    } else {
      cout << "YES\n";
      magic();
    }
  }
  return 0;
}
