#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n;
int x[N], y[N];
bool deng(int a, int b) {
  int a1 = (a == n ? 1 : (a) + 1), b1 = (b == n ? 1 : (b) + 1);
  int ax = x[a] - x[a1], ay = y[a] - y[a1];
  int bx = x[b] - x[b1], by = y[b] - y[b1];
  return (ax == -bx && ay == -by);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", x + i, y + i);
  if (n & 1) {
    puts("NO");
    return 0;
  }
  int t = n >> 1, ok = true;
  for (int i = 1; i <= t && ok; ++i) {
    if (deng(i, i + t)) continue;
    ok = false;
  }
  puts(ok ? "YES" : "NO");
  return 0;
}
