#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007LL;
int n;
int x[200005], y[200005];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x[i] >> y[i];
  }
  if (n % 2) {
    cout << "NO" << endl;
  } else {
    int X = x[0] + x[n / 2];
    int Y = y[0] + y[n / 2];
    int i;
    for (i = 0; i < n / 2; ++i) {
      if ((x[i] + x[i + n / 2] != X) || (y[i] + y[i + n / 2] != Y)) {
        break;
      }
    }
    if (i >= n / 2) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
