map{@$_=glob<>for'',1;$y=index-WTMOR,getc;<>;print grep(${$_!=$y}[$_],1..5)?No:Yes,$/}1..<>