Wish

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

Each second Martynas catches a glimpse of the sky through his telescope expecting to see a falling star. Every time he sees a falling star he makes a wish upon it.

Martynas believes that the more falling stars he will see while making a wish, the higher the probability the wish will come true.

Calculate the largest possible number of stars Martynas can see during a glimpse through his telescope.

The sky can be modelled as an endless plane. Martynas can see an area limited by a circle with center (0,0)(0, 0) and radius RR.

Before opening his telescope Martynas checked the star chart:

  • There are NN stars in the sky;
  • During the first glimpse the coordinates of the ii’th star will be a_ia\_i, b_ib\_i;
  • During the second glimpse (which will take place 11 sec. after the first one) the ii’th star will be c_ic\_i, d_id\_i;
  • All the stars are moving at constant speed;
  • The position of each star will change between the first and the second glimpse.

Martynas can keep looking at the stars forever.

입력

The first input line contains two numbers: the total amount of stars NN and the radius of the circle RR.

Each of remaining NN lines contains 44 integers each: a_ia\_i, b_ib\_i, c_ic\_i, d_id\_i describing the position of ii’th star during the first and the second glimpse.

출력

The first and the only output line should contain one integer – largest possible number of stars visible through the telescope.

제한

  • 1N200,0001 ≤ N ≤ 200\\,000
  • 1R100,000,0001 ≤ R ≤ 100\\,000\\,000
  • 100,000,000a_i,b_i,c_i,d_i100,000,000-100\\,000\\,000 ≤ a\_i , b\_i , c\_i , d\_i ≤ 100\\,000\\,000 (a star will move, i.e.: (a_i,b_i)(c_i,d_i)(a\_i , b\_i) \ne (c\_i , d\_i))