#include <bits/stdc++.h>
using namespace std;
double x[1000003], y[1000003];
double eps = 1e-8;
int sgn(double x) {
  if (fabs(x) < eps)
    return 0;
  else
    return x > 0 ? 1 : -1;
}
struct Point {
  double x, y;
  Point() {}
  Point(double a, double b) {
    x = a;
    y = b;
  }
  void input() { scanf("%lf%lf", &x, &y); }
};
Point operator+(Point a, Point b) { return Point(a.x + b.x, a.y + b.y); }
Point operator-(Point a, Point b) { return Point(a.x - b.x, a.y - b.y); }
Point operator*(Point a, double p) { return Point(a.x * p, a.y * p); }
Point operator/(Point a, double p) { return Point(a.x / p, a.y / p); }
bool operator<(Point a, Point b) {
  return a.x < b.x || (a.x == b.x && a.y < b.y);
}
bool operator==(Point a, Point b) {
  return sgn(a.x - b.x) == 0 && sgn(a.y - b.y) == 0;
}
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
Point bcenter(vector<Point> p) {
  int i, j, n;
  Point t, ans;
  double tp, s, tpx, tpy;
  s = t.x = t.y = 0;
  n = p.size();
  for (i = 0; i < n; i++) {
    if (i + 1 == n)
      j = 0;
    else
      j = i + 1;
    tp = cross(p[i], p[j]);
    s += tp / 2;
    t = t + (p[i] + p[j]) * tp;
  }
  ans = t / (6 * s);
  return ans;
}
int main() {
  int n, i;
  scanf("%d", &n);
  if (n % 2) {
    puts("NO");
    return 0;
  }
  x[0] = y[0] = 0;
  vector<Point> v;
  for (i = 0; i < n; i++) {
    scanf("%lf %lf", &x[i], &y[i]);
    v.push_back(Point{x[i], y[i]});
  }
  auto p = bcenter(v);
  for (i = 0; i < n / 2; i++) {
    if (sgn(p.x * 2 - x[i] - x[i + n / 2]) ||
        sgn(p.y * 2 - y[i] - y[i + n / 2])) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  return 0;
}
