sub n{($x,$y)=@_;!($x&$y)} @v=map$h{glob<>}//=$k++,0..5; print grep({ @a=eval; eval'n(n(n(0,1),2),n(n(3,4),5))'=~s/\d/$a[$v[$&]]/gr; }glob'{0,1},'x6)?YES:NO;