#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> arr[100007];
long long n;
int main() {
  scanf("%lld", &n);
  long long n1 = n;
  if (n1 % 2) {
    printf("NO\n");
    return 0;
  }
  long long x = n / 2 + 1;
  long long y = n / 2 - 1;
  for (int i = 0; i < n; i++) {
    scanf("%lld%lld", &arr[i].first, &arr[i].second);
  }
  for (int i = 0, j = 1; i < n / 2; i++, j++) {
    long long xx = (i + x) % n;
    long long yy = (j + y) % n;
    long long xxx = arr[i].first - arr[j].first;
    long long yyy = arr[i].second - arr[j].second;
    long long xxxx = arr[xx].first - arr[yy].first;
    long long yyyy = arr[xx].second - arr[yy].second;
    if (xxx != xxxx || yyyy != yyy) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
