#include <bits/stdc++.h>
using namespace std;
int dir8[8][2] = {{1, 0}, {0, 1},  {-1, 0}, {0, -1},
                  {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
int dir4[4][2] = {1, 0, 0, 1, -1, 0, 0, -1};
const int INF = 0x3f3f3f3fLL;
const long long LLF = 0x3f3f3f3f3f3f3f3fLL;
const int MAXn = 2e5 + 15;
const int mod = 1e9 + 7;
double x[100005], y[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lf%lf", &x[i], &y[i]);
  }
  if (n % 2 == 1) {
    printf("NO\n");
    return 0;
  }
  double p1 = (x[1] + x[n / 2 + 1]) / 2, p2 = (y[1] + y[n / 2 + 1]) / 2;
  for (int i = 2; i <= n / 2; i++) {
    double p3 = (x[i] + x[n / 2 + i]) / 2;
    double p4 = (y[i] + y[n / 2 + i]) / 2;
    if (p3 != p1 || p4 != p2) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
