#include <bits/stdc++.h>
using namespace std;
int mult(int x, int y) {
  long long int ans, x1 = (long long int)x, y1 = (long long int)y;
  ans = (x1 * y1) % 1000000007;
  return (int)ans;
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int lcm(int a, int b) { return a * (b / gcd(a, b)); }
int pow1(int a, int b) {
  int ans = 1;
  while (b > 0) {
    if (b & 1) ans = mult(ans, a);
    a = mult(a, a);
    b >>= 1;
  }
  return ans;
}
int mina(int arr[], int n) {
  int x = arr[0], i, pos = 0;
  for (i = 1; i < n; i++) {
    if (arr[i] < x) {
      x = arr[i];
      pos = i;
    }
  }
  return x;
}
int maxa(int arr[], int n) {
  int x = arr[0], i, pos = 0;
  for (i = 1; i < n; i++) {
    if (arr[i] > x) {
      x = arr[i];
      pos = i;
    }
  }
  return x;
}
int main() {
  int cnt = 0, n, a[100005], i, j;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 0 && i != n - 1) cnt++;
  }
  if (a[n - 1] == 1 || (a[n - 2] == 0 && cnt == 1)) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  if (n == 1) {
    cout << "0" << endl;
    return 0;
  }
  for (i = 0; i < n - 2; i++) {
    printf("(%d->", a[i]);
  }
  printf("%d", a[n - 2]);
  int k = n - 2;
  while (k--) cout << ")";
  cout << "->0" << endl;
  return 0;
}
