a[];main(){for(*a=-2;~(a[getchar()+1]+=1-a[11]*2););*a=!puts(~*a?"NO":"YES");}