#include <bits/stdc++.h>
using namespace std;
template <typename T>
class heap : public priority_queue<T, vector<T>, greater<T> > {};
int main(void) {
  int n;
  scanf("%d", &n);
  vector<pair<int, int> > in;
  for (int i = 0; i < n; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    in.push_back({a, b});
  }
  int area = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (in[i].first != in[j].first && in[j].second != in[i].second) {
        area = (in[i].first - in[j].first) * (in[i].second - in[j].second);
      }
    }
  }
  if (area)
    printf("%d\n", area < 0 ? -area : area);
  else
    puts("-1");
}
