#include <bits/stdc++.h>
using namespace std;
void printVP(vector<pair<long long int, long long int>> vec_of_pairs);
void printV(vector<int> vec);
void printVVI(vector<vector<int>> vec);
void printMapSP(map<string, pair<int, int>> mp);
void printPQ(priority_queue<int> pq);
void printVC(vector<char> vec);
void printCurrMap(map<char, set<char>> mp);
bool are_parallel(pair<int, int> c1l1, pair<int, int> c2l1, pair<int, int> c1l2,
                  pair<int, int> c2l2) {
  if (c2l1.first == c1l1.first || c2l2.first == c1l2.first) {
    if (c2l1.first == c1l1.first && c2l2.first == c1l2.first)
      return true;
    else
      return false;
  }
  double gradient1 =
      (c2l1.second - c1l1.second) * 1.0 / (c2l1.first - c1l1.first);
  double gradient2 =
      (c2l2.second - c1l2.second) * 1.0 / (c2l2.first - c1l2.first);
  return gradient1 == gradient2;
}
bool are_same_lng(pair<int, int> c1l1, pair<int, int> c2l1, pair<int, int> c1l2,
                  pair<int, int> c2l2) {
  long double diffy = (long double)(c2l1.second - c1l1.second) *
                      (c2l1.second - c1l1.second) * 1.0;
  long double diffx =
      (long double)(c2l1.first - c1l1.first) * (c2l1.first - c1l1.first) * 1.0;
  long double dist1 = (long double)diffy + diffx;
  diffy = (long double)(c2l2.second - c1l2.second) *
          (c2l2.second - c1l2.second) * 1.0;
  diffx =
      (long double)(c2l2.first - c1l2.first) * (c2l2.first - c1l2.first) * 1.0;
  long double dist2 = (long double)diffy + diffx;
  return dist1 == dist2;
}
void solve() {
  int N;
  cin >> N;
  vector<pair<int, int>> co_ords;
  for (int i = 0; i < N; i++) {
    pair<int, int> tmp;
    cin >> tmp.first >> tmp.second;
    co_ords.push_back(tmp);
  }
  if (N % 2 != 0) {
    cout << "NO" << endl;
    return;
  } else {
    int half_N = N / 2;
    for (int i = 0; i < half_N; i++) {
      pair<int, int> curr_start_coord = co_ords[i];
      pair<int, int> curr_end_coord = co_ords[i + 1];
      pair<int, int> opp_start_coord = co_ords[i + half_N];
      pair<int, int> opp_end_coord;
      if (i + 1 + half_N != N) {
        opp_end_coord.first = co_ords[i + 1 + half_N].first;
        opp_end_coord.second = co_ords[i + 1 + half_N].second;
      } else {
        opp_end_coord.first = co_ords[0].first;
        opp_end_coord.second = co_ords[0].second;
      }
      bool para = are_parallel(curr_start_coord, curr_end_coord,
                               opp_start_coord, opp_end_coord);
      bool same_lng = are_same_lng(curr_start_coord, curr_end_coord,
                                   opp_start_coord, opp_end_coord);
      if (!para || !same_lng) {
        cout << "NO" << endl;
        return;
      }
    }
  }
  cout << "YES" << endl;
}
void testShit() {
  char testtt = '7';
  char testtt2 = testtt + 1;
  cout << testtt2 << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  t = 1;
  for (int i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
