#P459. 练83.1 压缩歌曲
练83.1 压缩歌曲
Description
Xiaoming has some songs on his computer. Now he needs to store these songs on a hard drive.
The hard drive has limited space, and since Xiaoming downloaded lossless versions, each song takes up a large amount of space. The hard drive might not be able to hold all the songs, so he needs to compress some of them to fit as many songs as possible on his hard drive.
However, he wants to minimize the number of songs that need to be compressed. He doesn't know how to do this, so he's asking for your help.
Input Format
The first line contains two integers and (, ), representing the number of songs on Xiaoming's computer and the size of his hard drive (in bytes).
The next lines each contain two integers and (), representing the original size and compressed size of the -th song (in bytes).
Output Format
Output a single integer, representing the minimum number of songs Xiaoming needs to compress.
If the hard drive still can't hold all the songs even after compressing all of them, output .
Sample
4 21
10 8
7 4
3 1
5 42