#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0;
  bool flg = false;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') flg = true;
  for (; isdigit(ch); ch = getchar()) x = (x << 3) + (x << 1) + (ch ^ 48);
  return flg ? -x : x;
}
int n;
struct P {
  long long x, y;
} p[100010];
P operator-(const P &x, const P &y) { return P{x.x - y.x, x.y - y.y}; }
long long cross(const P &x, const P &y) { return x.x * y.y - x.y * y.x; }
long long dot(const P &x, const P &y) { return x.x * y.x + x.y * y.y; }
long long dot(const P &x) { return x.x * x.x + x.y * x.y; }
bool solve() {
  n = read();
  for (int i(1), _i(n); i <= _i; i++) {
    int x = read(), y = read();
    p[i] = P{x, y};
  }
  p[n + 1] = p[1];
  if (n & 1) return 0;
  int m = n >> 1;
  for (int i(1), _i(m); i <= _i; i++) {
    if (cross(p[i + m + 1] - p[i + m], p[i + 1] - p[i])) return 0;
    if (dot(p[i + m + 1] - p[i + m], p[i + 1] - p[i]) >= 0) return 0;
    if (dot(p[i + m + 1] - p[i + m]) != dot(p[i + 1] - p[i])) return 0;
  }
  return 1;
}
int main() {
  for (int T = 1; T--;) puts(solve() ? "yes" : "no");
  return 0;
}
