#include <bits/stdc++.h>
using namespace std;
int n;
int x[4];
int y[4];
int minx, miny, maxx, maxy;
int main() {
  minx = miny = 1005;
  maxx = maxy = -1005;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x[i] >> y[i];
    maxx = max(maxx, x[i]);
    maxy = max(maxy, y[i]);
    minx = min(minx, x[i]);
    miny = min(miny, y[i]);
  }
  if (maxx == minx || maxy == miny)
    cout << -1;
  else
    cout << (maxx - minx) * (maxy - miny);
  cout << '\n';
  return 0;
}
