#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int minx, maxx, miny, maxy;
  cin >> minx >> miny;
  maxx = minx, maxy = miny;
  if (n == 1) return puts("-1");
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    minx = min(minx, x);
    maxx = max(maxx, x);
    miny = min(miny, y);
    maxy = max(maxy, y);
  }
  if ((maxx == minx) || (maxy == miny)) return puts("-1");
  printf("%d\n", (maxx - minx) * (maxy - miny));
}
