#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  srand((unsigned)time(NULL));
  int a;
  int b[100][100];
  scanf("%d", &a);
  for (int i = 0; i < a; i++) {
    for (int j = 0; j < a; j++) {
      scanf("%d", &b[i][j]);
    }
  }
  int v = rand() % 2;
  if (v == 0) {
    cout << "Yes";
  }
  if (v == 1) {
    cout << "No";
  }
  return 0;
}
