#include <bits/stdc++.h>
using namespace std;
int pt[200000][2];
bool solve() {
  int n, hfn;
  scanf("%d", &n);
  if (n & 1) return false;
  hfn = n / 2;
  for (int i = 0; i < n; ++i) scanf("%d%d", &pt[i][0], &pt[i][1]);
  for (int i = 0; i < hfn; ++i)
    if (pt[i][0] + pt[i + hfn][0] != pt[0][0] + pt[hfn][0] ||
        pt[i][1] + pt[i + hfn][1] != pt[0][1] + pt[hfn][1])
      return false;
  return true;
}
int main() {
  if (solve())
    printf("Yes");
  else
    printf("NO");
  return 0;
}
