#include <bits/stdc++.h>
using namespace std;
template <class T>
bool setmax(T &_a, T _b) {
  if (_b > _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
bool setmin(T &_a, T _b) {
  if (_b < _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
T gcd(T _a, T _b) {
  return _b == 0 ? _a : gcd(_b, _a % _b);
}
int n, a[100010];
void solve() {
  if (a[n] == 1) {
    printf("NO\n");
    return;
  }
  if (n == 1) {
    printf("YES\n0\n");
    return;
  }
  if (a[n - 1] == 0 && find(a + 1, a + (n - 2) + 1, 0) == a + (n - 2) + 1)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = int(1); i <= int(n - 2); ++i) printf("(%d->", a[i]);
    printf("%d", a[n - 1]);
    for (int i = int(1); i <= int(n - 2); ++i) printf(")");
    printf("->%d\n", a[n]);
    return;
  }
}
int main() {
  scanf("%d", &n);
  for (int i = int(1); i <= int(n); ++i) scanf("%d", &a[i]);
  solve();
  return 0;
}
