Under construction

Still being built. Things may change

The Start of the Adventure

Time limit1sMemory limit917 MB

Summary
Given N weapons with prices and attack powers, the task is to check whether one affordable weapon has attack power above Huan's S.
Level

Easy1 of 10

Topics
Implementation, Brute force
Solved
No attempts yet

Problem

The four-person team Sanjini is leaving PULSE and plans to set off on an adventure with the money they saved in their piggy bank.

To begin the adventure, the team must beat the gatekeeper Huan. To win, they need a weapon with higher attack power than Huan's attack power SS. Before the fight, the team buys one weapon from a shop that sells NN weapons. They can buy only one weapon, and they cannot afford any weapon that costs more than their money XX. Find out whether the team can beat Huan and set off on the adventure.

Input

The first line contains the number of weapons NN sold in the shop. (1≤N≤100)(1 \leq N \leq 100)

The second line contains the money XX the team has and Huan's attack power SS, separated by a space. (1≤X,S≤109)(1 \leq X, S \leq 10^{9})

From the third line to line N+2N + 2, the price cic_i and attack power pip_i of the ii-th weapon are given, separated by a space. (1≤ci,pi≤109)(1 \leq c_i, p_i \leq 10^{9})

All given numbers are integers.

Output

Print YES if the team can set off on the adventure, and NO if they cannot.

Hint

PULSE is an algorithm club in the Department of Computer Science and Engineering at Pusan National University, founded in 2015.

Examples2

  1. Example 1

    Input
    3
    1 1
    1 2
    2 3
    3 4
    
    Expected output
    YES
    
  2. Example 2

    Input
    3
    2 5
    1 2
    2 3
    2 4
    
    Expected output
    NO