#include <bits/stdc++.h>
using namespace std;
multiset<pair<int, int>> MS;
int main() {
  int n;
  cin >> n;
  if (n == 1)
    cout << -1 << endl;
  else if (n == 2) {
    long long int l = 0, w = 0, x, y, px, py;
    cin >> x >> y;
    cin >> px >> py;
    l = abs(x - px);
    w = abs(y - py);
    if (l * w)
      cout << l * w;
    else
      cout << -1;
  } else {
    long long int l = 0, w = 0, x, y, px, py;
    cin >> x >> y;
    cin >> px >> py;
    l = abs(x - px);
    w = abs(y - py);
    cin >> px >> py;
    if (!l) l = abs(x - px);
    if (!w) w = abs(y - py);
    if (l * w)
      cout << l * w;
    else
      cout << -1;
  }
  return 0;
}
