#include <bits/stdc++.h>
using namespace std;
int n, m;
int flag, sum, ave, ans, res, len, ans1, ans2;
int a[11], b[11];
char s[101];
struct node {
  int x, y;
  int r, w;
  int to, next;
  void init() { r = 0; }
  friend bool operator<(node a, node b) { return a.r > b.r; }
} tn;
int main() {
  int i, j, k, kk, t, x, y, z;
  while (scanf("%d", &n) != EOF && n) {
    for (i = 0; i < n; i++) scanf("%d%d", &a[i], &b[i]);
    if (n == 1) {
      printf("-1\n");
    }
    if (n == 2) {
      if (a[0] == a[1] || b[0] == b[1])
        printf("-1\n");
      else {
        printf("%d\n", abs(a[0] - a[1]) * abs(b[0] - b[1]));
      }
    }
    if (n > 2) {
      x = a[0];
      for (i = 1; i < n; i++)
        if (x != a[i]) {
          x = abs(x - a[i]);
          break;
        }
      y = b[0];
      for (i = 1; i < n; i++)
        if (y != b[i]) {
          y = abs(y - b[i]);
          break;
        }
      printf("%d\n", x * y);
    }
  }
  return 0;
}
