#include <bits/stdc++.h>
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:36777216")
using namespace std;
const long double EPS = 1e-9;
struct Point {
  int x, y;
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  set<int> x, y;
  for (int i = 0; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    x.insert(a);
    y.insert(b);
  }
  if (x.size() == 2 && y.size() == 2) {
    int a = *x.rbegin() - *x.begin();
    int b = *y.rbegin() - *y.begin();
    cout << a * b;
  } else {
    cout << -1;
  }
  return 0;
};
