#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int a[n];
  for (long long int i = 0; i < n; i++) scanf("%d", &a[i]);
  if (a[n - 1] != 0) {
    printf("NO");
    return 0;
  }
  int zr = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] == 0)
      zr++;
    else
      break;
  }
  if (zr % 2 == 0) {
    int ind = -1;
    for (int i = n - 1; i >= 0; i--) {
      if (a[i] == 1) {
        ind = i;
        break;
      }
    }
    if (ind == -1) {
      if (n == 2) {
        printf("NO");
        return 0;
      }
      vector<char> v;
      v.push_back(char(a[0] + '0'));
      v.push_back('-'), v.push_back('>');
      v.push_back('(');
      v.push_back(char(a[1] + '0'));
      v.push_back('-'), v.push_back('>');
      v.push_back(char(a[2] + '0'));
      v.push_back(')');
      for (int i = 3; i < n; i++) {
        v.push_back('-'), v.push_back('>');
        v.push_back(char(a[i] + '0'));
      }
      printf("YES\n");
      for (auto x : v) {
        printf("%c", x);
      }
      return 0;
    }
    int ind1 = -1;
    for (int i = ind; i >= 0; i--) {
      if (a[i] == 0) {
        ind1 = i;
        break;
      }
    }
    if (ind1 == -1) {
      if (zr == 2) {
        printf("NO");
        return 0;
      }
      vector<char> v;
      for (int i = 0; i < n - 3; i++) {
        v.push_back(char(a[i] + '0'));
        if (i != n - 1) {
          v.push_back('-'), v.push_back('>');
        }
      }
      v.push_back('(');
      v.push_back('0');
      v.push_back('-');
      v.push_back('>');
      v.push_back('0');
      v.push_back(')');
      v.push_back('-');
      v.push_back('>');
      v.push_back('0');
      printf("YES\n");
      for (auto x : v) {
        printf("%c", x);
      }
      return 0;
    }
    vector<char> v;
    for (int i = 0; i < n; i++) {
      if (i == ind1) {
        v.push_back('(');
      }
      v.push_back(char(a[i] + '0'));
      if (i == ind + 1) {
        v.push_back(')'), v.push_back(')');
      }
      if (i != n - 1) {
        v.push_back('-'), v.push_back('>');
      }
      if (i == ind1) {
        v.push_back('(');
      }
    }
    printf("YES\n");
    for (auto x : v) {
      printf("%c", x);
    }
  } else {
    vector<char> v;
    for (int i = 0; i < n; i++) {
      v.push_back(char(a[i] + '0'));
      if (i != n - 1) {
        v.push_back('-'), v.push_back('>');
      }
    }
    printf("YES\n");
    for (auto x : v) {
      printf("%c", x);
    }
  }
}
