#include <bits/stdc++.h>
using namespace std;
void FastIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cout.precision(15);
}
int main() {
  FastIO();
  int n, x, y, x1, x2, y1, y2, i, j, area, f = 0;
  vector<pair<int, int> > v;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    v.push_back(make_pair(x, y));
  }
  sort(v.begin(), v.end());
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      x1 = v[i].first, y1 = v[i].second;
      x2 = v[j].first, y2 = v[j].second;
      if (x1 == x2 || y1 == y2)
        continue;
      else {
        f = 1;
        area = abs(x1 - x2) * abs(y1 - y2);
      }
    }
  }
  if (f)
    cout << area << "\n";
  else
    cout << -1 << "\n";
  return 0;
}
