#include #include #include #include #include #include #include #include #include #include using namespace std; int main(){ int n = 9; string s1, s2, s3; cin >> s1 >> s2 >> s3; s1 = s1 + s2 + s3; while(n){ if (s1[9-n] == s1[10-n]){ cout << "No" << endl; exit(0); } n--; } cout << "Yes" << endl; }