• + 0 comments

    My javascript solution (two liner, could easily be one):

    function main() {
        const points = Array(+readLine()).fill().map(_ => readLine().split(' ').map(x => +x));
        console.log([0, 1].some(x => points.every((y, _, arr) => y[x] == arr[0][x])) ? 'YES' : 'NO');
    }