#include <bits/stdc++.h>
using namespace std;
const double pi = 2 * acos(0);
const int oo = 1e9;
const int N = 1e5 + 5;
pair<int, int> arr[N];
int main() {
  int n;
  scanf("%d", &(n));
  map<pair<int, int>, int> mp;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &arr[i].first, &arr[i].second);
  }
  for (int i = 0; i < n; i++) {
    int dx = arr[i].first - arr[(i + 1) % n].first;
    int dy = arr[i].second - arr[(i + 1) % n].second;
    mp[{dx, dy}]++;
  }
  bool valid = true;
  for (auto& i : mp) {
    if (i.second != mp[{-i.first.first, -i.first.second}]) {
      valid = false;
      break;
    }
  }
  if (valid)
    puts("YES");
  else
    puts("NO");
  return 0;
}
