#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const int maxn = 1e5 + 50;
const int Mod = 1e6 + 3;
using namespace std;
const char YES[] = "YES", NO[] = "NO";
int n;
int s[maxn];
bool find(int &st) {
  st = n - 2;
  if (st <= 0) return false;
  while (st > 0 && s[st] != 0) st--;
  return st > 0;
}
void solve() {
  if (s[n] == 1) {
    puts(NO);
    return;
  }
  if (n == 1 || s[n - 1] == 1) {
    puts(YES);
    for (int i = 1; i < n + 1; i++) {
      if (i == 1)
        printf("%d", s[i]);
      else
        printf("->%d", s[i]);
    }
    puts("");
    return;
  }
  int pos;
  if (!find(pos)) {
    puts(NO);
    return;
  }
  puts(YES);
  for (int i = 1; i < pos; i++) {
    if (i == 1)
      printf("%d", s[i]);
    else
      printf("->%d", s[i]);
  }
  for (int i = pos; i < n + 1; i++) {
    if (i == n)
      printf("))->%d", s[i]);
    else if (i == pos || i == pos + 1) {
      if (i == pos && pos == 1)
        printf("(%d", s[i]);
      else
        printf("->(%d", s[i]);
    } else
      printf("->%d", s[i]);
  }
  puts("");
}
int main() {
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i < n + 1; i++) {
      scanf("%d", s + i);
    }
    solve();
  }
  return 0;
}
