#include <bits/stdc++.h>
using namespace std;
const unsigned long long mod = 1e9 + 7;
string check(int arr[], int n) {
  string s, r = ")";
  int x = -1, i, j, k;
  for (int i = n - 3; i >= 0; i--) {
    if (arr[i] == 0) {
      x = i;
      break;
    }
  }
  if (x == -1) {
    cout << "NO";
    exit(0);
  } else {
    for (j = 0; j < x; j++) {
      if (arr[j] == 1)
        s += "1->";
      else
        s += "0->";
    }
    s += "(0->(";
    for (k = x + 1; k < n - 2; k++) {
      s = s + "1->";
    }
    s += "0))";
    return s;
  }
}
int main() {
  string s;
  int arr[100001];
  long n, i, j, k;
  cin >> n;
  for (i = (0); i < n; i++) {
    cin >> arr[i];
  }
  if (n == 1) {
    if (arr[0] == 0) {
      cout << "YES" << endl << arr[0];
    } else
      cout << "NO";
  } else if (arr[n - 1] == 1) {
    cout << "NO";
    return 0;
  } else if (arr[n - 2] == 1 && arr[n - 1] == 0) {
    cout << "YES" << endl;
    for (i = (0); i < n - 1; i++) {
      cout << arr[i] << "->";
    }
    cout << arr[n - 1];
  } else {
    string s = check(arr, n);
    s += "->0";
    cout << "YES" << endl;
    cout << s;
  }
  return 0;
}
