Pizza veto voting

No attempts yetTime limit3sMemory limit256 MB

Problem

You are training for a programming contest with your team members Alice and Bob. After a few hours of training you want a break and some pizza. The three of you order one big pizza, so you have to settle on the kind first.

You have a favorite kind. Alice is on a diet, so she wants the pizza with the fewest calories. Bob is mean to Alice, so he wants the pizza with the most calories.

Voting for one kind would not settle anything, so you decide on veto voting. Alice vetoes one kind first, then Bob vetoes one, then you veto one. The order repeats with Alice, Bob and you again, until a single kind is left. Whoever is on turn must veto one of the remaining kinds.

Alice always vetoes the remaining pizza with the most calories, and Bob always vetoes the one with the fewest calories. You pick your vetoes so that your favorite pizza is the one left at the end. Decide whether you can make your favorite pizza the last kind standing.

Input

The first line has the number of kinds of pizza nn and the index of your favorite pizza pp (1n1000001 \le n \le 100\,000, 1pn1 \le p \le n). Indices start at 1.

Each of the next nn lines describes one pizza: the calories cc (0c10000000 \le c \le 1\,000\,000) and the name of the pizza ww, separated by a space. A name is a single word without spaces and is at most 100 characters long. The pizzas are given from the fewest calories to the most, and no two pizzas have the same number of calories.

Output

Print YES on one line if you can use your vetoes so that your favorite pizza is the one left at the end, and NO if you cannot.