#include <bits/stdc++.h>
using namespace std;
int x[5];
int y[5];
int aa[5];
int bb[5];
int main() {
  int n;
  int i;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
    sort(x, x + n);
    sort(y, y + n);
    int countaa = 0;
    int countbb = 0;
    for (i = 0; i < n; i++) {
      if (i == 0)
        aa[countaa++] = x[i];
      else {
        if (x[i] == x[i - 1]) {
          continue;
        } else {
          aa[countaa++] = x[i];
        }
      }
    }
    for (i = 0; i < n; i++) {
      if (i == 0) {
        bb[countbb++] = y[i];
      } else {
        if (y[i] == y[i - 1]) {
          continue;
        } else {
          bb[countbb++] = y[i];
        }
      }
    }
    if (countaa >= 2 && countbb >= 2) {
      printf("%d\n", (aa[countaa - 1] - aa[0]) * (bb[countbb - 1] - bb[0]));
    } else
      printf("-1\n");
  }
}
