#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 100;
int n;
struct node {
  long long x, y;
} s[N];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld", &s[i].x, &s[i].y);
  }
  int ok = 1;
  if (n % 2 == 0) {
    long long x = s[1].x + s[1 + n / 2].x;
    long long y = s[1].y + s[1 + n / 2].y;
    for (int i = 2; i <= n && i + n / 2 <= n; i++) {
      if (!(x == s[i].x + s[i + n / 2].x && y == s[i].y + s[i + n / 2].y))
        ok = 0;
    }
  } else
    ok = 0;
  printf("%s", ok ? "Yes" : "No");
}
