URI Online Judge | 2378

Elevator

By OBI - Olimpíada Brasileira de Informática 2010 BR Brazil

Timelimit: 1

The Scaling with Big Comfort (SBC) it's a traditional company, with more than 50 years working on the production of elevators. All SBC's projects follow the most stringent safety standards, but unfortunately a series of accidents involving their elevators ruined the company's reputation.

By studying the accident, the company's engineers found that in several cases, the accident was caused by excess passengers in the elevator. So, SBC decided to monitor more strictly the use of their elevators: they installed a sensor in each door to count how many people get in and out in each floor. They have the records of an entire day of the elevator (that always start empty). They know that people are well polite and always let all the passenges go out before going inside it, yet they are having difficulties to decide if the maximum capacity was exceeded or not.

Your job is to write a program that, given a sequence of sensor readings and the maximum capacity of the elevator, determine if it was exceeded at any point.

Input

The first input line contain two integers, N and C, indicating the number of sensor readings and the maximum capacity of the elevator, respectively (1 ≤ N ≤ 1000 and 1 ≤ C ≤ 1000). The next N lines contain, each one, the sensor reading count. Each one have two integers, S and E, indicating how many people came out and how much entered in that floor, respectively (0 ≤ S ≤ 1000 and 0 ≤ E ≤ 1000).

Output

Your program must print a single line containing the character 'S' if the capacity was exceeded at any moment, or 'N' otherwise.

Input Samples Output Samples

5 10

0 5

2 7

3 3

5 2

7 0

N

5 10

0 3

0 5

0 2

3 4

6 4

S

6 4

0 5

3 5

4 5

1 0

1 1

1 1

S