spoj MRECT1: finding number of intersection of points and rectangles