#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main () {
int n;
vector<int> x, y;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i] >> y[i];
}
sort (x.begin(), x.end());
sort (y.begin(), y.end());
int r = (x[n - 1] - x[0]) * (y[n - 1] - y[0]);
if (r <= 0) cout << -1;
else cout << r << endl;
return 0;
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbiAoKSB7CglpbnQgbjsKCXZlY3RvcjxpbnQ+IHgsIHk7CgljaW4gPj4gbjsKCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CgkJY2luID4+IHhbaV0gPj4geVtpXTsKCX0KCXNvcnQgKHguYmVnaW4oKSwgeC5lbmQoKSk7Cglzb3J0ICh5LmJlZ2luKCksIHkuZW5kKCkpOwoJaW50IHIgPSAoeFtuIC0gMV0gLSB4WzBdKSAqICh5W24gLSAxXSAtIHlbMF0pOwoJaWYgKHIgPD0gMCkgY291dCA8PCAtMTsKCWVsc2UgY291dCA8PCByIDw8IGVuZGw7CglyZXR1cm4gMDsKfQ==