'use strict'; function processData(input) { let lines = input.split("\n"); let nrQueries = parseInt(lines[0]); //console.error("queries " + nrQueries); let nrLine = 1; for (let i=0; i x) { minX = x; } if (maxY < y) { maxY = y; } if (minY > y) { minY = y; } } let good = true; //console.error(maxX + " / " +maxX + " / " + minY + " / " + maxY) for (let j = 0; j < dots.length; j++) { if (dots[j][0] != minX && dots[j][0] != maxX && dots[j][1] != maxY && dots[j][1] != minY ) { good = false; break; } } if (good) { console.log("YES"); } else { console.log("NO"); } } //Enter your code here } process.stdin.resume(); process.stdin.setEncoding("ascii"); let _input = ""; process.stdin.on("data", function (input) { _input += input; }); process.stdin.on("end", function () { processData(_input); });