#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &FF) {
  int RR = 1;
  FF = 0;
  char CH = getchar();
  for (; !isdigit(CH); CH = getchar())
    if (CH == '-') RR = -RR;
  for (; isdigit(CH); CH = getchar()) FF = FF * 10 + CH - 48;
  FF *= RR;
}
inline void file(string str) {
  freopen((str + ".in").c_str(), "r", stdin);
  freopen((str + ".out").c_str(), "w", stdout);
}
const int N = 1e5 + 10;
int n, xx, yy, x[N], y[N];
int main() {
  read(n);
  if (n % 2 == 1) {
    puts("nO");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    read(x[i]), read(y[i]);
    xx += x[i], yy += y[i];
  }
  int mid = n / 2;
  for (int i = mid + 1; i <= n; i++)
    if (x[i] * n + x[i - mid] * n != xx * 2 ||
        y[i] * n + y[i - mid] * n != yy * 2) {
      puts("nO");
      return 0;
    }
  puts("YES");
  return 0;
}
