#include #include #include #include #include #define REP(i,a,b) for(i=a;i=0 && cnv[buf[0]]>=0); assert(buf[1]>=0 && cnv[buf[1]]>=0); assert(buf[2]=='\0'); deg[cnv[buf[0]]] ^= 1; deg[cnv[buf[1]]] ^= 1; } assert( scanf("%d",&M)==1 ); assert( 1<=M&&M<=1000 ); while(M--){ scanf("%s",buf); assert(buf[0]>=0 && cnv[buf[0]]>=0); assert(buf[1]>=0 && cnv[buf[1]]>=0); assert(buf[2]=='\0'); unionConnect(ind, cnv[buf[0]], cnv[buf[1]]); } rep(i,52) sz[unionGet(ind,i)] += deg[i]; rep(i,52) if(sz[i]%2) break; if(i==52) puts("YES"); else puts("NO"); } return 0; }