#include <bits/stdc++.h>
using namespace std;
constexpr int MAXN = 8;
int n, x[MAXN], y[MAXN];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (x[i] != x[j] && y[i] != y[j])
        return cout << abs(x[i] - x[j]) * abs(y[i] - y[j]) << '\n', false;
  return cout << "-1\n", false;
}
