#include using namespace std; #ifdef _RUTHEN #include "debug.hpp" #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); V S(3); rep(i, 3) cin >> S[i]; rep(k, 2) { bool ok = 1; rep(i, 3) { rep(j, 3) { int c = S[i][j] == '#'; if ((c + i + j) % 2 != k) ok = 0; } } if (ok) { cout << "Yes" << '\n'; return 0; } } cout << "No" << '\n'; return 0; }