#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n, x, y, ans;
  set<int> X, Y;
  cin >> n;
  while (n--) {
    cin >> x >> y;
    X.insert(x);
    Y.insert(y);
  }
  if (X.size() != 2 || Y.size() != 2) {
    puts("-1");
  } else {
    ans = 0;
    set<int>::iterator it = X.begin();
    ans = (int)abs((*it) - (*(++it)));
    it = Y.begin();
    ans = ans * (int)abs((*it) - (*(++it)));
    cout << ans << endl;
  }
  return 0;
}
