#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e6 + 100;
const int mod = (int)1e9 + 7;
int n;
struct node {
  long long x, y;
} a[maxn], p[maxn];
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); ++i) scanf("%lld%lld", &a[i].x, &a[i].y);
  a[n + 1].x = a[1].x;
  a[n + 1].y = a[1].y;
  if (n % 2) return puts("NO"), 0;
  for (int i = (1); i <= (n); ++i) {
    p[i].x = a[i + 1].x - a[i].x;
    p[i].y = a[i + 1].y - a[i].y;
  }
  for (int i = (1); i <= (n / 2); ++i)
    if (p[i].x != -p[i + n / 2].x || p[i].y != -p[i + n / 2].y)
      return puts("NO"), 0;
  puts("YES");
}
