#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n;
int X[N], Y[N];
pair<int, int> L[N];
bool pd(int a, int b) {
  if (L[a].first < 0) L[a].first = -L[a].first, L[a].second = -L[a].second;
  if (L[b].first < 0) L[b].first = -L[b].first, L[b].second = -L[b].second;
  return (L[a].first == L[b].first && L[a].second == L[b].second);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &X[i], &Y[i]);
  }
  int cnt = 0;
  for (int i = 1; i < n; i++) {
    L[++cnt].first = X[i + 1] - X[i];
    L[cnt].second = Y[i + 1] - Y[i];
  }
  cnt++;
  L[cnt].first = X[n] - X[1];
  L[cnt].second = Y[n] - Y[1];
  if (n % 2 != 0) {
    puts("NO");
  } else {
    int flag = 0;
    for (int i = 1; i <= n / 2 && flag == 0; i++) {
      int id1 = i, id2 = i + n / 2;
      if (pd(id1, id2) == 0) flag = 1;
    }
    if (!flag)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
