#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
constexpr int INF = 1e9;
constexpr long long LLINF = 1e18;
constexpr bool LOG = false;
template <class T>
void Log(T t) {
  if (LOG) cerr << t << "\n";
}
template <class T, class... S>
void Log(T t, S... s) {
  if (LOG) cerr << t << "\t", Log(s...);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<char> a(n);
  for (decltype(n) i(0); i < (n); i++) cin >> ws >> a[i];
  if (a.back() == '1') {
    cout << "NO\n";
    return 0;
  }
  if (n == 1) {
    cout << "YES\n" << a[0] << "\n";
    return 0;
  }
  if (n >= 2 && a[n - 2] == '0') {
    bool z = false;
    for (decltype(n - 2) i(0); i < (n - 2); i++)
      if (a[i] == '0') z = true;
    if (!z) {
      cout << "NO\n";
      return 0;
    }
  }
  string s;
  for (int i = 0; i < n - 2; i++) {
    s += '(';
    s += a[i];
    s += "->";
  }
  s += a[n - 2];
  for (decltype(n - 2) i(0); i < (n - 2); i++) s += ')';
  s += "->";
  s += a[n - 1];
  cout << "YES\n" << s << "\n";
  return 0;
}
