#include <bits/stdc++.h>
using namespace std;
template <class t>
inline t read(t &x) {
  x = 0;
  char c = getchar();
  bool f = 0;
  while (!isdigit(c)) f |= c == '-', c = getchar();
  while (isdigit(c)) x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  if (f) x = -x;
  return x;
}
template <class t>
inline void write(t x) {
  if (x < 0) {
    putchar('-'), write(-x);
  } else {
    if (x > 9) write(x / 10);
    putchar('0' + x % 10);
  }
}
const int N = 1e5 + 5;
int n, x[N], y[N], px, py;
signed main() {
  read(n);
  if (n & 1) {
    puts("NO");
    return 0;
  }
  for (int i = 1; i <= n; i++) read(x[i]), read(y[i]);
  px = x[1] + x[n / 2 + 1];
  py = y[1] + y[n / 2 + 1];
  for (int i = 1, j = n / 2 + 1; j <= n; i++, j++)
    if (x[i] + x[j] != px || y[i] + y[j] != py) {
      puts("NO");
      return 0;
    }
  puts("YES");
}
