#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int N = 1e5 + 100;
const double eps = 1e-8;
int sgn(double x) {
  if (fabs(x) < eps) return 0;
  if (x < 0)
    return -1;
  else
    return 1;
}
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) {
    x = _x;
    y = _y;
  }
  void input() { scanf("%lf%lf", &x, &y); }
  bool operator==(Point b) const {
    return sgn(x - b.x) == 0 && sgn(y - b.y) == 0;
  }
  Point operator+(const Point &b) const { return Point(x + b.x, y + b.y); }
  Point operator/(const double &k) const { return Point(x / k, y / k); }
} point[N];
bool check(int n) {
  n /= 2;
  Point mark = (point[1] + point[n + 1]) / 2;
  for (int i = 2; i <= n; i++)
    if (!(mark == (point[i] + point[i + n]) / 2)) return false;
  return true;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) point[i].input();
  if (n & 1) return 0 * printf("NO");
  if (check(n))
    puts("YES");
  else
    puts("NO");
  return 0;
}
