CF593B Anton and Lines

题目描述

给定 $n$ 条形如 $y=k_ix+b_i$ 的直线,你需要判断是否存在两条直线 $a,b$,使 $a,b$ 的交点 $(x_0,y_0)$ 满足 $x_1

输入格式

第一行三个整数 $n,x_1,x_2$,意义如题述。 接下来 $n$ 行,每行两个整数 $k_i,b_i$,描述每条直线。

输出格式

如果存在这样的交点,输出 `YES`。否则输出 `NO`。 **【数据规模与约定】** $1\le n\le 10^5$,$-10^6\le x_1,x_2,k_i,b_i\le 10^6$。 数据保证对于每两条直线 $i,j(i\ne j)$,都有 $k_i\ne k_j$ 或 $b_i\ne b_j$。 Translated By [Sept](/user/224931)

说明/提示

In the first sample there are intersections located on the border of the strip, but there are no intersections located strictly inside it. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF593B/e1a49e4b0c04e7481c4ca085ab81f29a92c6744a.png)