#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
const bool db = false;
int mas[2000000];
int main() {
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> mas[i];
  if (mas[n] == 1) {
    cout << "NO\n";
    return 0;
  }
  long long i = 1;
  while (mas[i] == 1) i++;
  if (i == n - 1) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  if (i == n) {
    for (long long i = 1; i <= n; i++)
      if (i == n)
        cout << mas[i] << "\n";
      else
        cout << mas[i] << "->";
  } else {
    for (long long j = 1; j <= i - 1; j++) cout << mas[j] << "->";
    cout << "(0->(";
    for (long long j = i + 1; j <= n - 1; j++) {
      cout << mas[j];
      if (j == n - 1)
        cout << "))";
      else
        cout << "->";
    }
    cout << "->0\n";
  }
  return 0;
}
