To help as many people cross the swamp as possible, you have to use planks that connect tussocks. Once a tussock is stepped on, it sinks.
Your goal is to maximize the number of people who can safely cross from the starting point to the ending point using the available planks.
The first line of the input provides the number of planks, (1 \leq n \leq 1000). For each plank, the coordinates of the tussocks at both ends of the plank are given (-2^{31} \leq x_i, y_i \leq 2^{31}). Following this, the coordinates of the starting and ending points are provided (these points are distinct, and no plank connects them directly). All numbers in the input are integers.
Output the maximum number of people that can cross the swamp.
Example 1