#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     char a[111][111];     for (long long i = 1; i <= 3; i++)       for (long long j = 1; j <= 3; j++) cin >> a[i][j];     if (a[1][1] == a[3][3] && a[3][2] == a[1][2] && a[3][1] == a[1][3] &&         a[2][3] == a[2][1])       cout <<  YES ;     else       cout <<  NO ;     return 0;   }   