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