char a[];b;main(i){gets(a-11);for(;(b=getchar()-10)&&i;a[i]=0)for(i=-12;++i&&a[i]-b-10;);i=!puts(i?"YES":"NO");}