#C11119. Concert Attendance

    ID: 40400 Type: Default 1000ms 256MiB

Concert Attendance

Concert Attendance

Karen loves concerts and wants to attend as many as possible. However, she cannot attend overlapping concerts. Given the starting time and duration of each concert, determine whether Karen can attend all the concerts without any time conflicts.

For each concert, the ending time is given by the formula: \(end = start + duration\). Karen can attend all concerts if for every consecutive pair of concerts (after sorting by start time), the starting time of the latter is not less than the ending time of the former.

inputFormat

The input is read from standard input (stdin). The first line contains a single integer \(m\) representing the number of concerts. Each of the following \(m\) lines contains two integers \(start\) and \(duration\) separated by a space, which represent the start time and duration of a concert respectively.

outputFormat

Output a single line to standard output (stdout) with either "YES" if Karen can attend all the concerts without overlaps, or "NO" otherwise.

## sample
3
1 3
5 2
8 3
YES