#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 5;
int cnt[N];
int x[N], y[N];
int main() {
  int n;
  cin >> n;
  for (int i = (1); i < (n + 1); i++) {
    cin >> x[i] >> y[i];
  }
  if (n & 1) {
    cout << "NO";
    return 0;
  } else {
    n /= 2;
    int cx = x[1] + x[1 + n], cy = y[1] + y[n + 1];
    for (int i = (1); i < (n + 1); i++) {
      if (x[i] + x[i + n] != cx || y[i] + y[n + i] != cy) {
        cout << "NO";
        return 0;
      }
    }
    cout << "YES\n";
  }
  return 0;
}
