import Data.List
import Data.Bits
main=getLine>>getLine>>=putStr.(\xs->if length xs==3&&length(xs!!0)==length(xs!!1)&&length(xs!!1)==length(xs!!2)&&head(xs!!0)`xor`head(xs!!1)`xor`head(xs!!2)==0 then"Yes"else"No").group.map read.words
