#include <bits/stdc++.h>
using namespace std;
long long int mod = 1000000007;
long long int INF64 = mod * mod + 1;
template <class T1, class T2>
ostream& operator<<(ostream& o, pair<T1, T2> x) {
  return o << x.first << " " << x.second;
}
template <class T1, class T2>
istream& operator>>(istream& o, pair<T1, T2>& x) {
  return o >> x.first >> x.second;
}
template <class T1, class T2>
pair<T1, T2> operator+(pair<T1, T2> a, pair<T1, T2> b) {
  a.first += b.first;
  a.second += b.second;
  return a;
}
template <class T1, class T2>
pair<T1, T2> operator-(pair<T1, T2> a, pair<T1, T2> b) {
  a.first -= b.first;
  a.second -= b.second;
  return a;
}
template <class T1, class T2>
void operator+=(pair<T1, T2>& a, pair<T1, T2> b) {
  a.first += b.first;
  a.second += b.second;
}
template <class T1, class T2>
void operator-=(pair<T1, T2>& a, pair<T1, T2> b) {
  a.first -= b.first;
  a.second -= b.second;
}
void solve() {
  long long int n;
  cin >> n;
  vector<pair<long long int, long long int>> x(n);
  for (long long int i = 0; i < n; i++) cin >> x[i];
  if (n & 1) {
    cout << "NO" << '\n';
    return;
  }
  set<pair<long long int, long long int>> s;
  for (long long int i = 0; i < n / 2; i++) s.insert({x[i] + x[i + n / 2]});
  if (s.size() == 1)
    cout << "YES" << '\n';
  else
    cout << "NO" << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int T = 1;
  for (long long int i = 1; i <= T; i++) {
    solve();
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
}
