#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
const int mod = 1e9 + 7;
const int inf = 1 << 30;
pair<int, int> p[6];
int d(pair<int, int> a, pair<int, int> b) {
  return abs((a.first - b.first) * (a.second - b.second));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> p[i].first >> p[i].second;
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j)
      if (p[i].first != p[j].first && p[i].second != p[j].second)
        return cout << d(p[i], p[j]), 0;
  cout << -1;
  return 0;
}
