#include <iostream>
using namespace std;
#define MAX_PAGE_SIZE 210
int squares[MAX_PAGE_SIZE][MAX_PAGE_SIZE];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; ++i){ int x, y; cin >> x >> y;
squares[x + MAX_PAGE_SIZE / 2][y + MAX_PAGE_SIZE / 2] = 1;
}
int perimiter = 0;
for (int i = 0; i < MAX_PAGE_SIZE; ++i){
for (int j = 0; j < MAX_PAGE_SIZE; ++j){
if (squares[i][j]){
perimiter += !squares[i + 1][j] + !squares[i - 1][j] + !squares[i][j + 1] + !squares[i][j - 1];
}
}
}
int max = 0;
for (int j = 1; (perimiter - 2 * j) / 2 > 0; ++j){
int i = (perimiter - 2 * j) / 2;
if (i * j - n > max) {
max = i * j - n;
}
}
cout << max;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCiNkZWZpbmUgTUFYX1BBR0VfU0laRSAyMTAKIAppbnQgc3F1YXJlc1tNQVhfUEFHRV9TSVpFXVtNQVhfUEFHRV9TSVpFXTsKIAppbnQgbWFpbigpIHsKICAgIGludCBuOwogICAgY2luID4+IG47CiAgICBmb3IgKGludCBpID0gMDsgaSA8IG47ICsraSl7IGludCB4LCB5OyBjaW4gPj4geCA+PiB5OwogICAgICAgIHNxdWFyZXNbeCArIE1BWF9QQUdFX1NJWkUgLyAyXVt5ICsgTUFYX1BBR0VfU0laRSAvIDJdID0gMTsKICAgIH0KICAgIGludCBwZXJpbWl0ZXIgPSAwOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBNQVhfUEFHRV9TSVpFOyArK2kpewogICAgICAgIGZvciAoaW50IGogPSAwOyBqIDwgTUFYX1BBR0VfU0laRTsgKytqKXsKICAgICAgICAgICAgaWYgKHNxdWFyZXNbaV1bal0pewogICAgICAgICAgICAgICAgcGVyaW1pdGVyICs9ICFzcXVhcmVzW2kgKyAxXVtqXSArICFzcXVhcmVzW2kgLSAxXVtqXSArICFzcXVhcmVzW2ldW2ogKyAxXSArICFzcXVhcmVzW2ldW2ogLSAxXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIGludCBtYXggPSAwOwogICAgZm9yIChpbnQgaiA9IDE7IChwZXJpbWl0ZXIgLSAyICogaikgLyAyID4gMDsgKytqKXsgCiAgICAgICAgaW50IGkgPSAocGVyaW1pdGVyIC0gMiAqIGopIC8gMjsgCiAgICAgICAgaWYgKGkgKiBqIC0gbiA+IG1heCkgewogICAgICAgICAgICBtYXggPSBpICogaiAtIG47CiAgICAgICAgfQogICAgfQogICAgY291dCA8PCBtYXg7CiAgICByZXR1cm4gMDsKfQ==