const n = require("fs").readFileSync(0, "utf8").toString().trim().split('\n');

let [min_x, min_y] = n[1].split(' ').map(Number);
let [max_x, max_y] = [min_x, min_y];

n.slice(2).forEach( s => {
    let [x, y] = s.split(' ').map(Number);
    [min_x, min_y] = [Math.min(x, min_x), Math.min(y, min_y)];
    [max_x, max_y] = [Math.max(x, max_x), Math.max(y, max_y)];
});

console.log((max_x-min_x)*(max_y-min_y));