#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
int n, x[MAXN], y[MAXN], ctm, cnm;
int main() {
  scanf("%d", &n);
  if (n & 1) {
    printf("NO\n");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &x[i], &y[i]);
  }
  ctm = x[0] + x[n / 2], cnm = y[0] + y[n / 2];
  for (int i = 0; i < n / 2; i++) {
    if ((!(x[i] + x[i + n / 2] == ctm)) || (!(y[i] + y[i + n / 2] == cnm))) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
