#include <bits/stdc++.h>
using namespace std;
struct node {
  double x, y;
  bool operator<(const node& a) const {
    if (x == a.x) return y < a.y;
    return x < a.x;
  }
};
node num[100005];
node zd(node a, node b) {
  node tmp;
  tmp.x = (a.x + b.x) / 2;
  tmp.y = (a.y + b.y) / 2;
  return tmp;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%lf%lf", &num[i].x, &num[i].y);
  sort(num, num + n);
  if (n % 2 == 1) {
    cout << "NO";
    return 0;
  }
  node t = zd(num[0], num[n - 1]);
  for (int i = 1; i < n / 2; i++) {
    node tmp = zd(num[i], num[n - 1 - i]);
    if (tmp.x != t.x || tmp.y != t.y) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
