#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n = 0;
  cin >> n;
  if (n % 2) {
    cout << "No\n";
    return 0;
  }
  set<pair<double, double> > mid;
  vector<pair<double, double> > p(n);
  for (int i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  for (int i = 0; i < n / 2; i++)
    mid.insert(make_pair((p[i].first + p[n / 2 + i].first) / 2.,
                         (p[i].second + p[n / 2 + i].second) / 2.));
  cout << (mid.size() == 1 ? "Yes\n" : "No\n");
  return 0;
}
