#include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace atcoder; typedef long long ll; #define rep(i,n) for (int i = 0; i < int(n);i++) int main(){ vector> s(3,vector(3)); rep(i,3) rep(j,3) cin >> s[i][j]; bool can = true; for (int i = 0; i < 3;i++){ for (int j = 0; j < 3;j++){ if ((i+j)%2 == 0 && s[i][j] == '.') continue; else if ((i+j)%2 == 1 && s[i][j] == '#') continue; else{ can = false; break; } } } can = true; for (int i = 0; i < 3;i++){ for (int j = 0; j < 3;j++){ if ((i+j)%2 == 0 && s[i][j] == '#') continue; else if ((i+j)%2 == 1 && s[i][j] == '.') continue; else{ can = false; break; } } } if (can) cout << "Yes" << endl; else cout << "No" << endl; return 0; }