#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int x[4], y[4], mnx = 1000, mny = 1000, mxx = -1000, mxy = -1000;
  for (int i = 0, a, b; i < n; i++) {
    scanf("%d%d", &x[i], &y[i]);
    if (x[i] < mnx) mnx = x[i];
    if (y[i] < mny) mny = y[i];
    ;
    if (x[i] > mxx) mxx = x[i];
    ;
    if (y[i] > mxy) mxy = y[i];
  }
  if (n == 1 || (n == 2 && (mnx == mxx || mny == mxy))) {
    printf("-1\n");
    return 0;
  } else {
    printf("%d\n", (mxx - mnx) * (mxy - mny));
    return 0;
  }
  return 0;
}
