#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const long long infll = LLONG_MAX;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  int xmin = inf, ymin = inf;
  int xmax = -inf, ymax = -inf;
  for (int i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    xmin = min(xmin, x);
    xmax = max(xmax, x);
    ymin = min(ymin, y);
    ymax = max(ymax, y);
  }
  int second = (xmax - xmin) * (ymax - ymin);
  if (second == 0) {
    cout << -1;
  } else {
    cout << second;
  }
  return 0;
}
