#include <bits/stdc++.h>
using namespace std;
long long n, dis1, dis2;
pair<long long, long long> arr[4];
inline long long multi(long long n) { return n * n; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (long long i = 0; i <= n - 1; i++) cin >> arr[i].first >> arr[i].second;
  sort(arr, arr + n);
  if (n == 2 && arr[0].first != arr[1].first &&
      arr[0].second != arr[1].second) {
    dis1 = abs(arr[1].second - arr[0].second),
    dis2 = abs(arr[1].first - arr[0].first);
    cout << dis1 * dis2 << endl;
    return 0;
  } else if (n == 4 || n == 3) {
    dis1 = abs(arr[0].second - arr[1].second),
    dis2 = abs(arr[0].first - arr[2].first);
    if (!dis1) dis1 = arr[2].second;
    cout << dis1 * dis2 << "\n";
    cin >> n;
    return 0;
  }
  cout << "-1\n";
  cin >> n;
  return 0;
}
