Checking if a plane can be divide by a line at 45 degrees such that weight sum is equal
function is_partition_possible ( n , x , y , w ) { let weight_at_x = new Map ( ) ; let max_x = - 2e3 , min_x = 2e3 ;