#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int len = 0, wid = 0;
  cin >> n;
  vector<pair<int, int> > points;
  for (int i = 1; i <= n; i++) {
    int in1, in2;
    cin >> in1 >> in2;
    points.push_back(make_pair(in1, in2));
  }
  for (int i = 0; i < points.size() - 1; i++) {
    if (points[i].first != points[i + 1].first) {
      len = abs(points[i].first - points[i + 1].first);
    }
    if (points[i].second != points[i + 1].second) {
      wid = abs(points[i].second - points[i + 1].second);
    }
  }
  int area = len * wid;
  if (area == 0) {
    cout << "-1";
  } else {
    cout << area;
  }
  return 0;
}
