#include <bits/stdc++.h>
using namespace std;
int main() {
  int minx = 2000, miny = 2000, maxx = -2000, maxy = -2000;
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    minx = min(minx, x);
    maxx = max(maxx, x);
    miny = min(miny, y);
    maxy = max(maxy, y);
  }
  printf("%d\n",
         minx != maxx && miny != maxy ? (maxx - minx) * (maxy - miny) : -1);
  return 0;
}
