Burger Town is a city that consists of special junctions and pathways. There is exactly one shortest path between each pair of junctions. Junction is located at and the distance between two junctions is defined by the Taxicab geometry.
Tim has recently afforded a taxicab to work as a taxicab driver. His vehicle was very cheap, but has a very big flaw. It can only drive units horizontally and units vertically before refueling.
If a customer wants to be brought from a junction to another junction , then this car is only capable of driving the route, iff the sum of horizontal distances and the sum of vertical distances on this path are less than or equal to and respectively.
Also, there is a unique path between any two junctions.
Now he has thoughts about returning the vehicle back to the seller. But he first wants to know, if it's even worth it. That's why he wants to know the number of unordered pairs such that it is not possible to drive a customer from junction to junction .
Input Format
On the first line you will be given , and separated by a single space.
Each of the next lines contains two space separated integers , denoting the location of junction .
Each of the next lines contains two space separated integers describing a path existing between , i.e., there is a path between and .
Output Format
Output the number of unordered pairs such that it is not possible to drive from to .
Constraints
Sample Input
3 2 1
0 0
1 1
2 0
1 2
2 3
Sample Output
1
Explanation
The car is only capable of driving units horizontally and unit vertically. The horizontal distance between junction 1 and 3(via 2) is equal to 2(), which fits under the horizontal limit of the car. The vertical distance between 1 and 3 is also equal to 2(), but this is not possible for this car since .