#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int x[MAXN], y[MAXN];
int main() {
  int n;
  scanf("%d", &n);
  double avx = 0, avy = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
  }
  if (n % 2 == 1) {
    printf("NO\n");
    return 0;
  }
  avx = (x[1] + x[1 + n / 2]) / 2.0, avy = (y[1] + y[1 + n / 2]) / 2.0;
  bool check = 1;
  for (int i = 1; i <= n / 2; i++) {
    if ((x[i] + x[i + n / 2]) / 2.0 != avx) {
      check = 0;
      break;
    }
    if ((y[i] + y[i + n / 2]) / 2.0 != avy) {
      check = 0;
      break;
    }
  }
  if (check) {
    printf("YES\n");
  } else
    printf("NO\n");
  return 0;
}
