#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, x, y, x_mi, x_ma, y_mi, y_ma;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> x >> y;
    if ((i == 1) || (x < x_mi)) x_mi = x;
    if ((i == 1) || (x > x_ma)) x_ma = x;
    if ((i == 1) || (y < y_mi)) y_mi = y;
    if ((i == 1) || (y > y_ma)) y_ma = y;
  }
  if ((x_mi != x_ma) && (y_mi != y_ma))
    cout << (x_ma - x_mi) * (y_ma - y_mi);
  else
    cout << "-1";
  return 0;
}
