print<>=~$"*<>*(grep$p*$'>($p=$_)*$`,glob<>)?NO:YES