#include using namespace std; using P = pair; const int inf = 1073741824; const long long linf = 1152921504606846976; // const int mod = 998244353; // const int mod = 1000000007; const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1}; void _main() { vector s(3); for (int i = 0; i < 3; i++) cin >> s[i]; vector s1(3), s2(3); string h = "#.#", d = ".#."; s1[0] = h; s1[1] = d; s1[2] = h; s2[0] = d; s2[1] = h; s2[2] = d; cout << ((s == s1 or s == s2) ? "Yes\n" : "No\n"); return; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(15); _main(); }