#include <bits/stdc++.h> #define MAX 100 using namespace std; int main() { int n; int data[MAX][MAX]; while (cin >> n) { for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) cin >> data[i][j]; bool flag = true; for (int i = 0; i < n && flag; i++) for (int j = 0; j < i && flag; j++) { if (data[i][j] != data[j][i]) flag = false; } if (flag) cout << "Yes!" << endl; else cout << "No!" << endl; } }