Limits 2s, 512 MB

Jahid does not like to study. He loves to do other things during his study time. Killing mosquitoes with mosquito killer rackets is one of those things. He enjoys this the most and tries his best to spend his study time killing mosquitoes.

Jahid's elder brother Jadu is very worried about this. So he made some laser lights which can detect mosquitoes and burn the wings of the mosquitoes eventually making the mosquitoes unable to fly. But the laser lights can shoot the beam in a straight line. So he arranged all the laser lights on a wooden frame and placed the frame on the opposite wall of a window. The laser lights now aim towards the window in a straight line and they shoot beams across the room if they detect any mosquito on the intersection point of the window and the straight line.

Now Jadu is wondering at most how many mosquitoes can he kill if he knows the entry points of the mosquitoes through the window beforehand. He can move and rotate the whole wooden frame as he wishes only once. No walls restrict the movement and rotation of the frame. The laser beams have a radius of 10-2 units.

Input

The first line contains two integers N and M (1 ≤ N, M ≤ 100) where N is the number of mosquitoes and M is the number of lasers. The next N lines contain pairs of floating point numbers Xi and Yi (-200 ≤ Xi, Yi ≤ 200), defining the position of the mosquitoes entry point through the window. The next M lines contain pairs of floating point numbers Xj and Yj (-200 ≤ Xj, Yj ≤ 200), defining the position of the laser lights on the wooden frame. Points will be given with precision of 8 digits. No pair of mosquitoes or laser lights will have distance less or equal to 2*10-2.

Output

Print the maximum number of mosquitoes that can be killed by the setup possibly by moving and rotating the wooden frame.

Sample

InputOutput
3 2
0.00000000 0.00000000
1.00000000 0.00000000
1.00000000 1.00000000
2.41421356 0.00000000
1.00000000 0.00000000
2

Submit

Login to submit.

Statistics

38% Solution Ratio
NirjhorEarliest, Jan '19
nusuBotFastest, 0.2s
ovis96Lightest, 393 kB
NirjhorShortest, 2283B
Toph uses cookies. By continuing you agree to our Cookie Policy.