#include <bits/stdc++.h>
using namespace std;
set<int> xs, ys;
int main() {
  int n, x, y;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    xs.insert(x);
    ys.insert(y);
  }
  if (xs.size() < 2 || ys.size() < 2) {
    cout << "-1";
  } else {
    int a = *xs.begin();
    int b = *(++xs.begin());
    int c = *ys.begin();
    int d = *(++ys.begin());
    cout << abs(a - b) * abs(c - d);
  }
  return 0;
}
