#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int x1, x2, x3, y1, y2, y3;
  if (n == 1)
    cout << -1;
  else {
    if (n == 2) {
      cin >> x1 >> y1 >> x2 >> y2;
      if (x1 != x2 && y1 != y2)
        cout << abs((x1 - x2) * (y1 - y2));
      else
        cout << -1;
    } else {
      cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
      if (x1 != x2 && y1 != y2) {
        cout << abs((x1 - x2) * (y1 - y2));
        return 0;
      }
      if (x1 != x3 && y1 != y3) {
        cout << abs((x1 - x3) * (y1 - y3));
        return 0;
      }
      if (x3 != x2 && y3 != y2) {
        cout << abs((x3 - x2) * (y3 - y2));
        return 0;
      }
      cout << -1;
    }
  }
  return 0;
}
