Bloodseeker

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

문제

Bloodseeker is facing nn enemies. At the beginning, he has mm hit-points, and every second his hit-points are decreased by 11. If his hit-points become 00, he dies. But he can kill the enemies to regenerate his hit-points.

The ii-th enemy is to be hit t_it\_i times to kill. Bloodseeker makes one hit per second. Every second, he is able to hit any enemy. After the ii-th enemy receives a last hit, Bloodseeker regenerates h_ih\_i hit-points (but his hit-points can't become greater than mm). Note that if Bloodseeker had 11 hit-point before he last-hits the ii-th enemy, he doesn't die.

Can Bloodseeker kill all enemies?

입력

The first line contains an integer TT (1T2000001 \le T \le 200000) --- the number of test cases.

The first line of each test case contains two integers nn and mm (1n200000,1m1091 \le n \le 200000, 1 \le m \le 10^9) --- the number of enemies and the maximal Bloodseeker's hit-points.

Each of the next nn lines in each test case contains two integers t_it\_i and h_ih\_i (1t_i,h_i1091 \le t\_i, h\_i \le 10^9) --- the time required for killing the ii-th enemy and the number of hit-points regenerated after it.

It is guaranteed that the sum of all nn does not exceed 200000200000.

출력

For each test case, if it's possible to kill all the enemies, output "YES", otherwise output "NO".