#include <bits/stdc++.h>
using namespace std;
long long R = pow(10, 9) + 7;
template <typename T>
T last(vector<T>& v) {
  return v[v.size() - 1];
}
template <typename T>
void prll(vector<T>& v) {
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i] << ' ';
  }
  cout << endl;
}
template <typename T1, typename T2>
void prll(vector<pair<T1, T2>>& v) {
  cout << "[";
  for (long long i = 0; i < v.size(); i++) {
    cout << '(' << v[i].first << ',' << v[i].second << "),";
  }
  cout << "]" << endl;
}
template <typename T>
void prll(vector<vector<T>>& v) {
  cout << "[";
  for (long long i = 0; i < v.size(); i++) {
    prll(v[i]);
  }
  cout << "]" << endl;
}
template <typename T>
void prll(set<T>& v) {
  cout << "{";
  for (auto i : v) {
    cout << i << ' ';
  }
  cout << "}" << endl;
}
template <typename T1, typename T2>
void prll(map<T1, T2>& v) {
  cout << "{";
  for (auto i : v) {
    cout << i.first << ':' << i.second << ',';
  }
  cout << "}" << endl;
}
template <typename T>
bool in(set<T>& indices, T x) {
  return indices.find(x) != indices.end();
}
template <typename T, typename T_>
bool in(map<T, T_>& indices, T x) {
  return indices.find(x) != indices.end();
}
long long power(long long x, long long y) {
  long long res = 1;
  x = x % R;
  if (x == 0) return 0;
  while (y > 0) {
    if (y % 2 == 1) res = (res * x) % R;
    y /= 2;
    x = (x * x) % R;
  }
  return res;
}
bool compare(long long a, long long b) { return (a < b); }
void TestCase() {
  long long n;
  cin >> n;
  vector<pair<long long, long long>> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i].first >> v[i].second;
  }
  if (n % 2 != 0) {
    cout << "NO" << '\n';
    return;
  }
  long long sumx = 0;
  long long sumy = 0;
  for (long long i = 0; i < n; i++) {
    sumx += v[i].first;
    sumy += v[i].second;
  }
  for (long long i = 0; i < n / 2; i++) {
    if (!(v[0].first + v[n / 2].first == v[i].first + v[i + n / 2].first &&
          v[0].second + v[n / 2].second == v[i].second + v[i + n / 2].second)) {
      cout << "NO" << '\n';
      return;
    }
  }
  cout << "YES" << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long T;
  T = 1;
  for (long long tt = 1; tt <= T; tt++) {
    TestCase();
  }
}
