#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> x, y;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    bool can = true;
    for (int j = 0; j < x.size(); j++)
      if (x[j] == a) can = false;
    if (can) x.push_back(a);
    can = true;
    for (int j = 0; j < y.size(); j++)
      if (y[j] == b) can = false;
    if (can) y.push_back(b);
  }
  if (x.size() < 2 || y.size() < 2) {
    cout << -1;
    return 0;
  }
  cout << 1ll * abs(x[0] - x[1]) * abs(y[0] - y[1]) << endl;
  return 0;
}
