#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
long long ln, lk, lm;
void fmain() {
  scanf("%d", &n);
  set<int> sx, sy;
  for (int(i) = 0; (i) < (int)(n); (i)++) {
    int x, y;
    scanf("%d%d", &x, &y);
    sx.insert(x);
    sy.insert(y);
  }
  if (sx.size() == 2 && sy.size() == 2) {
    int a = *sx.rbegin() - (*sx.begin());
    int b = *sy.rbegin() - (*sy.begin());
    printf("%d\n", a * b);
  } else
    puts("-1");
}
int main() {
  fmain();
  return 0;
}
