#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> nul;
  int n;
  cin >> n;
  string s;
  for (unsigned i = 1; i < n; i++) {
    char a;
    cin >> a;
    s += a;
    if (a == '0')
      nul.push_back(s), s = "";
    else
      s += "->";
  }
  char a;
  cin >> a;
  if (a == '1')
    cout << "NO" << endl;
  else if (nul.size() == 0 && s.size() == 0)
    cout << ((a - '0') ? "NO" : "YES\n0") << endl;
  else if (nul.size() == 0)
    cout << "YES\n" << s << "0" << endl;
  else if (nul.size() == 1)
    cout << (s.empty() ? "NO" : "YES\n" + nul.back() + "->" + s + "0") << endl;
  else {
    cout << "YES" << endl;
    for (unsigned i = 0; i < nul.size() - 2; i++)
      cout << "(" + nul[i] + ")"
           << "->";
    cout << "((" << nul[nul.size() - 2] << ")->(" << nul.back() << "))->"
         << "(" << s << "0)" << endl;
  }
  return 0;
}
