#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 5, mod = 1e9 + 7, mod1 = 998244353, mod2 = 1e9 + 9,
                inf = 1e18 + 7;
const long long infll = 1e18 + 7;
long long n;
pair<long long, long long> a[N];
set<pair<long long, long long> > st;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  if (n & 1) return cout << "NO", 0;
  ;
  for (long long i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  for (long long i = 0; i < n; i++) {
    st.insert({a[i].first + a[(i + n / 2) % n].first,
               a[i].second + a[(i + n / 2) % n].second});
  }
  if (st.size() == 1) return cout << "YES", 0;
  ;
  cout << "NO";
}
