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