#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target(sse, sse2, sse3, ssse3, sse4, popcnt, tune = native)
#pragma GCC optimize(                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           \
    "-fdelete-null-pointer-checks,inline-functions-called-once,-funsafe-loop-optimizations,-fexpensive-optimizations,-foptimize-sibling-calls,-ftree-switch-conversion,-finline-small-functions,inline-small-functions,-frerun-cse-after-loop,-fhoist-adjacent-loads,-findirect-inlining,-freorder-functions,no-stack-protector,-fpartial-inlining,-fsched-interblock,-fcse-follow-jumps,-fcse-skip-blocks,-falign-functions,-fstrict-overflow,-fstrict-aliasing,-fschedule-insns2,-ftree-tail-merge,inline-functions,-fschedule-insns,-freorder-blocks,-fwhole-program,-funroll-loops,-fthread-jumps,-fcrossjumping,-fcaller-saves,-fdevirtualize,-falign-labels,-falign-loops,-falign-jumps,unroll-loops,-fsched-spec,-ffast-math,Ofast,inline,-fgcse,-fgcse-lm,-fipa-sra,-ftree-pre,-ftree-vrp,-fpeephole2", \
    3)
#pragma comment(linker, "/STACK:10000000000")
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  const long double pi = 3.1415926535897;
  int x1, y1, x2, y2, x3, y3, x4, y4;
  int n;
  cin >> n;
  if (n == 1) {
    cin >> x1 >> y1;
    cout << -1;
    return 0;
  }
  if (n == 2) {
    cin >> x1 >> y1 >> x2 >> y2;
    if (x1 == x2 || y1 == y2)
      cout << -1;
    else
      cout << abs(x1 - x2) * abs(y1 - y2);
    return 0;
  }
  if (n == 3) {
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  }
  if (n == 4) {
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
  }
  cout << max(abs(x2 - x1), max(abs(x3 - x2), abs(x3 - x1))) *
              max(abs(y2 - y1), max(abs(y3 - y2), abs(y3 - y1)));
  return 0;
}
