시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 128 MB27321819281.702%

문제

Once upon a time after winning another competition at KBTU, Bakhytzhan, Askar and Artem walked throw the Old Square. When they found some interesting rectangle lines on the asphalt, they stopped and screamed out ”R tree”. They screamed so loud that all people around them screamed ”ALIENS”. Bakhytzhan knew that these lines were resigned by aliens from the Moon which landed on the square the night before. Now they want to know is it true that some alien’s ship landed on the place where Bakhytzhan stopped.

입력

The first line of the input file contains a single integer number n – the number of alien’s ships (1 ≤ n ≤ 10 000). The second line of the input file contains a pair of integer numbers – Bakhytzhan’s coordinates – b1 and b2 (−10 000 ≤ b1,b2 ≤ 10 000). The following n lines describe n alien’s ships. Each alien’s ship is described by 2 pairs of integer coordinates: first pair lx and ly (−10 000 ≤ lx,ly ≤ 10 000) describes bottom left corner of the ship and the second pair hx and hy (−10 000 ≤ hx,hy ≤ 10 000) describes top right corner of the ship on a Cartesian plane.

출력

The output file must contain ”Yes” if any alien’s ship landed on the place where Bakhytzhan stopped, and ”No” otherwise.

예제 입력 1

2
2 2
1 1 4 4
5 5 7 7

예제 출력 1

Yes

출처

Contest > KBTU Open > KBTU Open 2008 A번