#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int x[maxn], y[maxn], suf[maxn];
int xx[maxn], yy[maxn];
int main(void) {
  int t = 1;
  while (t--) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%d%d", x + i, y + i);
    if (n % 2 == 1)
      printf("NO\n");
    else {
      int f = 1;
      for (int i = 1; i <= n / 2; i++) {
        int j = i + n / 2;
        xx[i] = x[i] + x[j];
        yy[i] = y[i] + y[j];
      }
      for (int i = 1; i < n / 2; i++)
        if (xx[i] != xx[i + 1] || yy[i] != yy[i + 1]) f = 0;
      if (f)
        printf("YES\n");
      else
        printf("NO\n");
    }
  }
}
