#include <bits/stdc++.h>
using namespace std;
constexpr int N = 100000;
template <class T>
struct Point {
  T x, y;
  Point<T> operator+(const T &c) const { return {this->x + c, this->y + c}; }
  Point<T> operator-(const T &c) const { return {this->x - c, this->y - c}; }
  Point<T> operator*(const T &c) const { return {this->x * c, this->y * c}; }
  Point<T> operator/(const T &c) const { return {this->x / c, this->y / c}; }
  Point<T> operator-() const { return {-this->x, -this->y}; }
  Point<T> operator+(const Point<T> &b) const {
    return {this->x + b.x, this->y + b.y};
  }
  Point<T> operator-(const Point<T> &b) const {
    return {this->x - b.x, this->y - b.y};
  }
  T operator*(const Point<T> &b) const {
    return (this->x * b.x) + (this->y * b.y);
  }
  T operator^(const Point<T> &b) const {
    return (this->x * b.y) - (this->y * b.x);
  }
  T operator!() const { return (this->x * this->x) + (this->y * this->y); }
  bool operator<(const Point<T> &b) const {
    if (this->x == b.x) {
      return this->y < b.y;
    }
    return this->x < b.x;
  }
  bool operator>(const Point<T> &b) const { return b < *this; }
  bool operator==(const Point<T> &b) const {
    return !(*this < b) and !(*this > b);
  }
  bool operator!=(const Point<T> &b) const { return !(*this == b); }
};
template <class T>
string to_string(const Point<T> &p) {
  return "(" + to_string(p.x) + ", " + to_string(p.y) + ")";
}
template <class T>
T shoelace(const vector<Point<T>> &p) {
  T ans = static_cast<T>(0);
  for (int i = 0; i < p.size(); i++) {
    ans = ans + (p[i] ^ p[(i + 1) % p.size()]);
  }
  return ans;
}
template <class T>
Point<T> centroid(const vector<Point<T>> &p) {
  Point<T> c = {static_cast<T>(0), static_cast<T>(0)};
  for (int i = 0; i < p.size(); i++) {
    c.x = c.x +
          (p[i].x + p[(i + 1) % p.size()].x) * (p[i] ^ p[(i + 1) % p.size()]);
    c.y = c.y +
          (p[i].y + p[(i + 1) % p.size()].y) * (p[i] ^ p[(i + 1) % p.size()]);
  }
  return c / (static_cast<T>(3) * shoelace(p));
}
string convert(const Point<double> &p) {
  string x, y;
  x = to_string(p.x);
  y = to_string(p.y);
  if (x == "-0.000000") {
    x = "0.000000";
  }
  if (y == "-0.000000") {
    y = "0.000000";
  }
  return "(" + x + ", " + y + ")";
}
int main() {
  vector<string> s;
  vector<Point<double>> p, q;
  Point<double> c;
  string x, y;
  int n, i;
  scanf("%d", &n);
  p.resize(n);
  for (i = 0; i < n; i++) {
    scanf("%lf%lf", &p[i].x, &p[i].y);
  }
  c = centroid(p);
  for (i = 0; i < n; i++) {
    p[i] = p[i] - c;
    s.push_back(convert(p[i]));
  }
  sort(s.begin(), s.end());
  for (i = 0; i < n; i++) {
    auto it = lower_bound(s.begin(), s.end(), convert(-p[i]));
    if (it == s.end() or *it != convert(-p[i])) {
      break;
    }
  }
  if (i < n) {
    printf("NO\n");
  } else {
    printf("YES\n");
  }
  return 0;
}
