#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
pair<int, int> pts[N];
pair<int, int> operator+(pair<int, int> a, pair<int, int> b) {
  return {a.first + b.first, a.second + b.second};
}
pair<int, int> operator-(pair<int, int> a, pair<int, int> b) {
  return {a.first - b.first, a.second - b.second};
}
int main() {
  int n;
  scanf("%d", &n);
  if (n & 1) {
    printf("no\n");
    return 0;
  }
  for (int i = 0; i < n; ++i) scanf("%d%d", &pts[i].first, &pts[i].second);
  for (int i = 0; i < n / 2; ++i) {
    if (pts[i + 1] - pts[i] !=
        pts[(i + n / 2) % n] - pts[(i + 1 + n / 2) % n]) {
      printf("no\n");
      return 0;
    }
  }
  printf("yes\n");
  return 0;
}
