Matches for children are not toys!
Vasya loves to solve puzzles with matches. Most often they are formulated as follows: the image A is made up of matches; shift the minimum number of matches in it so that to get the image B.
For example, from the number of the current team championship of schoolchildren in St. Petersburg on programming, you can get a rhombus with a diagonal by shifting just three matches.
The puzzles that Vasya solves always have a solution. This means that the set of matches used in the image A matches the set of matches used in the image B. In addition, in one image, two matches that have a common section of nonzero length never occur (that is, matches can intersect, but cannot overlap).
Vasya is tired of solving puzzles manually, and now he asks you to write a program that will solve puzzles for him. The program will receive the descriptions of images A and B and should find the minimum number of matches that need to be shifted in the image A so that the resulting picture is obtained from B by parallel transfer.
Input
The first line contains the number of matches n (1 ≤ n ≤ 1000) in each of the images.
The following n lines contain the coordinates of the ends of the matches in the image A. Match number i is described by the integers x[1i]
, y[1i]
, x[2i]
, y[2i]
- the coordinates of its ends. The following n lines contain a description of the image B in the same format. The set of lengths of these matches matches the set of lengths of matches from the image A.
All coordinates do not exceed 10^4
by in absolute value. All matches have a non-zero length, i.e. x[1i]
≠ x[2i]
or y[1i]
≠ y[2i]
.
Output
Print the minimum number of matches to be shifted so that the image A coincides with the image B up to parallel transfer.