$`%(map{$y=$x;0while$_=${$x=$_}}sort/ \d+/g)?print$x-$y?NO:YES,$/:$x-$y?$$x=$y:0for<>