#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-9;
int sgn(double num) {
  if (fabs(num) < eps) {
    return 0;
  } else {
    return num > 0 ? 1 : -1;
  }
}
int dcmp(double a, double b) {
  if (fabs(a - b) < eps) {
    return 0;
  } else {
    return a > b ? 1 : -1;
  }
}
class P {
 public:
  P(){};
  ~P(){};
  double x, y;
  P(double x, double y) : x(x), y(y) {}
  P operator+(P p) { return {x + p.x, y + p.y}; }
  P operator-(P p) { return {x - p.x, y - p.y}; }
  P operator*(double d) { return {x * d, y * d}; }
  P operator/(double d) { return {x / d, y / d}; }
  double distTo(P p) { return (*this - p).abs(); }
  double angle() const { return atan2(y, x); }
  double abs() { return sqrt(abs2()); }
  double abs2() { return (x * x + y * y); }
};
const int maxn = 1e5 + 5;
int n = 0;
P pts[maxn];
int main(int argc, char const *argv[]) {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x = 0, y = 0;
    scanf("%d%d", &x, &y);
    pts[i] = P(x, y);
  }
  if (n % 2 != 0) {
    printf("NO\n");
    return 0;
  }
  int idx = n / 2;
  for (int i = idx; i < n; i++) {
    P p1 = pts[i - idx];
    P p3 = pts[i];
    P p2 = pts[i - idx + 1];
    P p4;
    if (i == n - 1) {
      p4 = pts[0];
    } else {
      p4 = pts[i + 1];
    }
    P new1 = p1 - p2;
    P new2 = p3 - p4;
    if (dcmp(fabs(new1.x), fabs(new2.x)) == 0 &&
        dcmp(fabs(new1.y), fabs(new2.y)) == 0) {
      continue;
    } else {
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
  return 0;
}
