#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int maxn = 1e6 + 10;
const int maxm = 1e6 + 10;
struct INFO {
  int first, second;
} info[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> info[i].first >> info[i].second;
  int px = info[1].first + info[n / 2 + 1].first,
      py = info[1].second + info[n / 2 + 1].second;
  bool ok = 1;
  for (int i = 2; i <= n / 2; ++i)
    if (info[i].first + info[n / 2 + i].first != px ||
        info[i].second + info[n / 2 + i].second != py)
      ok = 0;
  printf("%s\n", ok && (~n & 1) ? "YES" : "NO");
  return 0;
}
