#include <bits/stdc++.h>
using namespace std;
int n;
int x[4], y[4];
int solve() {
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (x[i] != x[j] && y[i] != y[j])
        return abs(x[i] - x[j]) * abs(y[i] - y[j]);
    }
  }
  return -1;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d %d", &x[i], &y[i]);
  printf("%d\n", solve());
}
