#K6731. Library Book Accommodation

    ID: 32614 Type: Default 1000ms 256MiB

Library Book Accommodation

Library Book Accommodation

In this problem, you are given the number of genres GG in a library and a list of GG pairs of integers. For each genre ii, the pair consists of NiN_i, the number of books, and SiS_i, 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 i=1,2,,Gi = 1,2,\ldots,G, 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:

  1. The first line contains a single integer GG, the number of genres.
  2. Each of the following GG lines contains two space-separated integers NiN_i and SiS_i, representing the number of books and the shelf capacity for genre ii, 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