#include <bits/stdc++.h>
using namespace std;
struct hehe {
  int x, y;
} p[4];
int cmp(hehe a, hehe b) { return a.x < b.x; }
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i < n; i++) scanf("%d%d", &p[i].x, &p[i].y);
    int flag = 0;
    for (int i = 0; i < n - 1; i++) {
      for (int j = i + 1; j < n; j++)
        if (p[i].x != p[j].x && p[i].y != p[j].y) {
          flag = 1;
          printf("%d\n", abs(p[i].x - p[j].x) * abs(p[i].y - p[j].y));
        }
      if (flag) break;
    }
    if (!flag) printf("-1\n");
  }
  return 0;
}
