#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ix = 1001, iy = 1001, ax = -1001, ay = -1001, s, a[4], b[4];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &a[i], &b[i]);
  if (n == 1) {
    printf("-1");
    return 0;
  } else if ((n == 2) && ((a[0] == a[1]) || (b[0] == b[1]))) {
    printf("-1");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    ix = min(ix, a[i]);
    iy = min(iy, b[i]);
    ax = max(ax, a[i]);
    ay = max(ay, b[i]);
  }
  s = (ay - iy) * (ax - ix);
  printf("%d", s);
  return 0;
}
