#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i] >> b[i];
  if (n % 2 == 1) {
    cout << "nO";
    return 0;
  }
  for (int i = 1; i <= n / 2; i++)
    if (a[i] + a[n / 2 + i] != a[1] + a[n / 2 + 1] ||
        b[i] + b[n / 2 + i] != b[1] + b[n / 2 + 1]) {
      cout << "nO";
      return 0;
    }
  cout << "YES";
  return 0;
}
