#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int solve(int x1, int y1, int x2, int y2) {
  return abs(x1 - x2) * abs(y1 - y2);
}
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<int, int>> v(n);
  for (int i = 0; i < n; ++i) scanf("%d%d", &v[i].first, &v[i].second);
  if (n == 1) {
    puts("-1");
    return 0;
  }
  if (n == 2) {
    if (v[0].first != v[1].first && v[0].second != v[1].second) {
      printf("%d", solve(v[0].first, v[0].second, v[1].first, v[1].second));
    } else {
      puts("-1");
      return 0;
    }
  }
  if (n == 3) {
    if (v[0].first != v[1].first && v[0].second != v[1].second)
      printf("%d", solve(v[0].first, v[0].second, v[1].first, v[1].second));
    else if (v[0].first != v[2].first && v[0].second != v[2].second)
      printf("%d", solve(v[0].first, v[0].second, v[2].first, v[2].second));
    else
      printf("%d", solve(v[1].first, v[1].second, v[2].first, v[2].second));
  }
  if (n == 4) {
    if (v[0].first != v[1].first && v[0].second != v[1].second)
      printf("%d", solve(v[0].first, v[0].second, v[1].first, v[1].second));
    else if (v[0].first != v[2].first && v[0].second != v[2].second)
      printf("%d", solve(v[0].first, v[0].second, v[2].first, v[2].second));
    else if (v[0].first != v[3].first && v[0].second != v[3].second)
      printf("%d", solve(v[0].first, v[0].second, v[3].first, v[3].second));
    else if (v[1].first != v[2].first && v[1].second != v[2].second)
      printf("%d", solve(v[1].first, v[1].second, v[2].first, v[2].second));
    else if (v[1].first != v[3].first && v[1].second != v[3].second)
      printf("%d", solve(v[1].first, v[1].second, v[3].first, v[3].second));
    else
      printf("%d", solve(v[2].first, v[2].second, v[3].first, v[3].second));
  }
  return 0;
}
