#K6731. Library Book Accommodation
Library Book Accommodation
Library Book Accommodation
In this problem, you are given the number of genres in a library and a list of pairs of integers. For each genre , the pair consists of , the number of books, and , the shelf space capacity for that genre. Your task is to determine whether the library can accommodate all books. That is, for every genre, the number of books must not exceed the shelf space available.
Formally, you need to check if for all , the inequality $$N_i \le S_i$$ holds. If it is true for every genre, output "True"; otherwise, output "False".
Example:
For input:
3
10 15
5 10
8 9
The output is "True" because in each pair, the number of books does not exceed the shelf space.
inputFormat
The input is read from standard input (stdin) and contains multiple lines:
- The first line contains a single integer , the number of genres.
- Each of the following lines contains two space-separated integers and , representing the number of books and the shelf capacity for genre , respectively.
outputFormat
Output a single line to standard output (stdout) containing either "True" if every genre can accommodate its books, or "False" otherwise.## sample
3
10 15
5 10
8 9
True