Curtains
문제
Benson the Rabbit is organizing a performance on his plane!
He has a stage with sections numbered to from left to right. He also has curtains numbered from to .
Each of these curtains can be lowered. Lowering curtain covers sections to . A curtain configuration is a set of lowered curtains. Given a curtain configuration, a section (1 ≤ x ≤ n) is covered if and only if there exists a lowered curtain such that l[i] ≤ x ≤ r[i].
Benson wants to give a total of performances, numbered from to . For each performance , Benson requires a curtain configuration such that the sections to are covered and nothing else is covered. More formally, for each 1 ≤ x ≤ n,
- If s[j] ≤ x ≤ e[j], section is covered.
- Otherwise, section is not covered.
For each of these performances, help Benson to determine if there exists a curtain configuration satisfying his requirements.
입력
The first line of input will contain spaced integers , and , representing the number of sections, curtains and performances respectively.
The next lines of input will contain spaced integers each. The -th of these lines will contain and respectively, describing the range of sections that curtain can cover.
The next lines of input will contain spaced integers each. The -th of these lines will contain and respectively, describing the range of sections that need to be covered for performance .
출력
Output lines, the -th of which should contain YES if it is possible to cover the required sections for the -th performance using the curtains, and NO otherwise.
예제
예제 1
6 2 3 1 2 3 4 1 3 1 4 1 5
NO YES NO
예제 2
10 10 10 6 9 6 7 1 6 10 10 5 9 3 9 2 10 5 7 9 10 5 10 7 8 4 7 1 6 2 7 3 9 7 7 2 9 4 9 6 6 5 7
NO NO YES NO YES NO NO NO NO YES