#include <bits/stdc++.h>   using namespace std;   const int MAX = 100005;   int n;   int firzero = -1;   int a[MAX];   int main() {     scanf( %d , &n);     for (int i = 0; i < n; ++i) {       scanf( %d , &a[i]);       if (!a[i] && firzero == -1) firzero = i;     }     if (a[n - 1])       printf( NO n );     else {       if (n == 1) {         printf( YES n0 n );       } else if (a[n - 2]) {         printf( YES n );         for (int i = 0; i < n; ++i) {           if (i)             printf( ->%d , a[i]);           else             printf( %d , a[i]);         }         printf(  n );       } else if (firzero != n - 2 && firzero != -1) {         printf( YES n );         for (int i = 0; i < firzero; ++i) {           printf( %d-> , a[i]);         }         printf( (0->( );         for (int i = firzero + 1; i < n - 1; ++i) {           if (i == firzero + 1)             printf( %d , a[i]);           else             printf( ->%d , a[i]);         }         printf( ))->0 n );       } else {         printf( NO n );       }     }     return 0;   }   