#include <bits/stdc++.h>
using namespace std;
namespace {}
unsigned long long __gcd(unsigned long long a, unsigned long long b) {
  if (b == 0) return a;
  return __gcd(b, a % b);
}
const double PI = atan(1.0) * 4;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  vector<vector<long long>> v;
  for (int i = 0; i < n; ++i) {
    long long first, second;
    cin >> first >> second;
    v.push_back({first, second});
  }
  if (n % 2 == 1) {
    cout << "NO\n";
    return 0;
  }
  long long MX = (v[0][0] + v[n / 2][0]);
  long long MY = (v[0][1] + v[n / 2][1]);
  for (int i = 1; i < n / 2; ++i) {
    long long mx = (v[i][0] + v[n / 2 + i][0]);
    long long my = (v[i][1] + v[n / 2 + i][1]);
    if (mx != MX || my != MY) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << "YES\n";
  return 0;
}
