#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  register long long x = 0, f = 1;
  register char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - 48, c = getchar();
  return x * f;
}
inline long long Mul(long long a, long long b) {
  return 1ll * a * b % 1000000007;
}
inline long long Inc(long long a, long long b) {
  return (a += b) >= 1000000007 ? a - 1000000007 : a;
}
inline long long Dec(long long a, long long b) {
  return (a -= b) < 0 ? a + 1000000007 : a;
}
inline long long qpow(long long a, long long b) {
  long long r = 1;
  while (b) {
    if (b & 1) r = Mul(r, a);
    a = Mul(a, a), b >>= 1;
  }
  return r;
}
long long n;
struct node {
  long long x, y;
} e[100005];
inline bool cmp(node a, node b) { return a.x == b.x ? a.y < b.y : a.x < b.x; }
signed main() {
  n = read();
  for (long long i = (1), iLimit = (n); i <= iLimit; ++i)
    e[i].x = read(), e[i].y = read();
  if (n & 1) return puts("NO"), 0;
  long long pax = e[1].x + e[n / 2 + 1].x, pay = e[1].y + e[n / 2 + 1].y;
  for (long long i = (2), iLimit = (n / 2); i <= iLimit; ++i)
    if (e[i].x + e[n / 2 + i].x != pax || e[i].y + e[n / 2 + i].y != pay)
      return puts("NO");
  puts("YES");
  return 0;
}
