#include #include #include #include #include #include using namespace std; int eightBit[10][2]; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int q,n,i,j; string tot; cin >>q; for (i=0; i> n; for (j=0; j> eightBit[j][k]; tri[j][k]=eightBit[j][k]; if ((tri[k][j+1]==tri[k+1][j]) and (tri[k][j]!=tri[k+1][j+1])) {tot ="NO";} else {tot = "YES";} } } cout << tot << endl; } return 0; }