#include <bits/stdc++.h>
using namespace std;
struct song {
  int x;
  int y;
} a[5];
int n;
bool cmp(song a, song b) {
  if (a.x == b.x) return a.y < b.y;
  return a.x < b.x;
}
int main() {
  int x, y;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d %d", &a[i].x, &a[i].y);
  if (n == 1) printf("-1\n");
  if (n == 2) {
    if (a[1].x == a[2].x || a[1].y == a[2].y)
      printf("-1\n");
    else
      printf("%d\n", abs(a[1].x - a[2].x) * abs(a[1].y - a[2].y));
  }
  sort(a + 1, a + 1 + n, cmp);
  if (n == 3) {
    if (a[1].x == a[2].x) {
      x = abs(a[2].y - a[1].y);
      y = abs(a[3].x - a[1].x);
    } else {
      x = abs(a[2].x - a[1].x);
      y = abs(a[3].y - a[2].y);
    }
    printf("%d\n", x * y);
  }
  if (n == 4) {
    x = abs(a[2].y - a[1].y);
    y = abs(a[3].x - a[1].x);
    printf("%d\n", x * y);
  }
  return 0;
}
