#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int mo = 1e9 + 7;
LL qpow(LL a, LL b) {
  LL ans = 1;
  a %= mo;
  while (b) {
    if (b & 1) ans = ans * a % mo;
    b >>= 1;
    a = a * a % mo;
  }
  return ans;
}
const int maxn = 1e5 + 5;
pair<int, int> a[maxn];
int main() {
  int n;
  scanf("%d", &n);
  if (n & 1) {
    printf("NO\n");
    exit(0);
  }
  int i, j;
  for (i = 0; i < n; i++) {
    scanf("%d%d", &a[i].first, &a[i].second);
  }
  int sumx = a[0].first + a[n / 2].first, sumy = a[0].second + a[n / 2].second;
  int x, y;
  for (i = 0, j = n / 2; j < n; i++, j++) {
    x = a[i].first + a[j].first, y = a[i].second + a[j].second;
    if (x != sumx || y != sumy) {
      printf("NO\n");
      exit(0);
    }
  }
  printf("YES\n");
  return 0;
}
