#include <bits/stdc++.h>
using namespace std;
int x[4], y[4];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  sort(x, x + n);
  int nx = unique(x, x + n) - x;
  sort(y, y + n);
  int ny = unique(y, y + n) - y;
  if (nx == 2 && ny == 2)
    cout << (x[1] - x[0]) * (y[1] - y[0]);
  else
    cout << -1;
}
