#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x0, y0, X, Y, x, y;
  cin >> n >> x >> y;
  for (x0 = X = x, y0 = Y = y; cin >> x >> y;
       x0 = min(x0, x), X = max(X, x), y0 = min(y0, y), Y = max(Y, y))
    ;
  cout << (x0 == X || y0 == Y ? -1 : (X - x0) * (Y - y0));
}
