#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
while(cin>>n){
int arr[n][n];
int temp;
for(int i =0;i<n;i++){
for(int j =0;j<n;j++){
cin>>temp;
arr[i][j] = temp;
}
}
bool isSym = true;
for(int i =0;i<n;i++){
for(int j =i;j<n;j++){
if(arr[i][j] !=arr[j][i]){
isSym = false;
break;
}
}
}
cout<<(isSym?"Yes!" : "No!")<<endl;
}
}
// 64 位输出请用 printf("%lld")
qd

京公网安备 11010502036488号