14341434 SUSTech Online Judge
Problem 1434 --Tidy cables

1434: Tidy cables

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 118  Solved: 35
[Submit][Status][Web Board]

Description

There are too many cables under your table, and you want to tidy them. You designed a simple cabling scheme: There are \(n\) cables, each cable is a line in form of \(y = k_i*x + b_i\), your table is the region between \(x = x_1\) and \(x = x_2\). If any two cables intersect on your table region (not include the edges), your table is not tidy and you need to design another scheme. 

More formally, there are \(n\) lines in form of \(y = k_i*x + b_i\), if there are two lines intersect on \((x_p, y_p)\), and \(x_1 < x_p < x_2\), then the scheme need be redesigned.

You want to know whether you need to redesign the scheme.

Input

The first line of the input contains an integer \(n\) \((2 ≤ n ≤ 10^5)\)

The second line contains two integers \(x_1\) and \(x_2\) \(( - 10^9 ≤ x_1 < x_2  ≤ 10^9)\)

The following n lines contain integers \(k_i , b_i\)  \(( -10^6 ≤ k_i , b_i ≤ 10^6)\), which describe lines. It is guaranteed that all cables are pairwise distinct.

Output

If you need redesign the scheme, print "YES" (without quotes).

Else, print "NO".

Sample Input

2
1 3
1 0
-1 3

Sample Output

YES

HINT

Source

 

[Submit][Status]