#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n; vector vs(11,string(11,'#')); vs[2][8]='A'; vs[3][9]='B'; vs[7][9]='C'; for(int i=0;i>x1>>y1>>x2>>y2; swap(vs[x1][y1],vs[x2][y2]); } vector ws(11,string(11,'#')); ws[5][8]='A'; ws[4][8]='B'; ws[6][8]='C'; cout<<(vs==ws?"YES":"NO")<