In a two-dimensional hardware layout, crossing wires need expensive gadgets. You are given m existing straight wires and a new connection from (x0,y0) to (x1,y1). The new connection need not be straight, but it may not pass through a point where two or more existing wires already meet.
The start and end points do not lie on an existing wire. Each pair of wires meets in at most one point, and wires do not overlap. Find the minimum number of existing wires that must be crossed, and print that number.
A single test case is given.
Every coordinate has absolute value less than 105.
Print the minimum number of existing wires that must be crossed to connect the start and end points.