#include <bits/stdc++.h>
using namespace std;
pair<int, int> arr[200010];
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int i, n, a, b, x, y;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a >> b;
    arr[i] = {a, b};
  }
  if (n & 1) {
    cout << "NO\n";
    return 0;
  }
  x = (arr[0].first + arr[n / 2].first);
  y = (arr[0].second + arr[n / 2].second);
  for (i = 1; i < n / 2; i++) {
    a = (arr[i].first + arr[i + n / 2].first);
    b = (arr[i].second + arr[i + n / 2].second);
    if (a != x || b != y) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << "YES\n";
  return 0;
}
