#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int maxn = 1e6 + 7;
int n;
int a[maxn];
int b[maxn];
char ans[maxn];
bool solve() {
  if (a[n - 1] != 0) return false;
  for (int i = 0; i < n; i++) b[i] = a[i];
  if (n == 1) {
    ans[0] = '0';
    return true;
  }
  int p = -1;
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] == 1) {
      p = i;
      break;
    }
    if (i > 0 && a[i - 1] == 1 && a[i] == 0)
      a[i - 1] = 0;
    else
      a[i - 1] = 1;
  }
  if (p < 0) return false;
  int j = 0;
  for (int i = 0; i < p; i++) {
    ans[j++] = b[i] + '0';
    ans[j++] = '-';
    ans[j++] = '>';
  }
  int cnt = 0;
  for (int i = p; i < n - 2; i++) {
    cnt++;
    ans[j++] = '(';
    ans[j++] = b[i] + '0';
    ans[j++] = '-';
    ans[j++] = '>';
  }
  ans[j++] = b[n - 2] + '0';
  for (int i = 0; i < cnt; i++) ans[j++] = ')';
  ans[j++] = '-';
  ans[j++] = '>';
  ans[j++] = b[n - 1] + '0';
  return true;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  if (solve())
    cout << "YES\n" << ans << endl;
  else
    cout << "NO" << endl;
  return 0;
}
