#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, ans;
  scanf("%d", &n);
  pair<int, int> a[n];
  for (k = 0; k < n; k++) scanf("%d%d", &a[k].first, &a[k].second);
  sort(a, a + n);
  if (n == 1)
    ans = -1;
  else if (n == 2)
    ans = abs(a[0].first - a[1].first) * abs(a[0].second - a[1].second);
  else if (n == 3) {
    if (a[0].first == a[1].first)
      ans = abs(a[0].second - a[1].second) * abs(a[1].first - a[2].first);
    else
      ans = abs(a[0].first - a[1].first) * abs(a[1].second - a[2].second);
  } else
    ans = abs(a[0].second - a[1].second) * abs(a[1].first - a[2].first);
  if (ans == 0) ans = -1;
  printf("%d\n", ans);
  return 0;
}
