#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007ll;
const int infty = numeric_limits<int>::max();
struct __ {
  __() {
    ios_base::Init i;
    ios_base::sync_with_stdio(0);
    cin.tie(0);
  }
} __;
void err() { cerr << endl; }
template <typename T, typename... Ts>
void err(T a, Ts... as) {
  cerr << a << ' ';
  err(as...);
}
int main() {
  int n;
  cin >> n;
  if (n % 2) {
    cout << "NO" << endl;
    return 0;
  }
  vector<long long> first(n);
  vector<long long> second(n);
  for (int i = 0; i < n; ++i) cin >> first[i] >> second[i];
  for (int i = 0; i < n; ++i) {
    long long dx = first[(i + 1) % n] - first[i];
    long long dy = second[(i + 1) % n] - second[i];
    if ((first[(n / 2 + i + 1) % n] + dx != first[(n / 2 + i) % n]) ||
        (second[(n / 2 + i + 1) % n] + dy != second[(n / 2 + i) % n])) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
