#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, h1 = 0, h2 = 0;
  cin >> n;
  int a[n][2];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 2; j++) cin >> a[i][j];
  if (n == 1)
    cout << -1;
  else if (n == 2) {
    h1 = abs(a[0][0] - a[1][0]) * abs(a[0][1] - a[1][1]);
    if (h1 > 0)
      cout << h1;
    else
      cout << -1;
  } else {
    for (int i = 0; i < n - 1; i++)
      if (a[i][0] != a[i + 1][0]) h1 = abs(a[i][0] - a[i + 1][0]);
    for (int j = 0; j < 2; j++)
      if (a[j][1] != a[j + 1][1]) h2 = abs(a[j][1] - a[j + 1][1]);
    cout << h1 * h2;
  }
}
