Piecewise Linearity

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Alice is obsessed with linear functions and especially their plots that are always so mysteriously straight. Recently she found out a plot of function f(x)=x1f(x) = |x-1| that impressed her a lot: it was twice as mysterious and beautiful since it consisted not only of one straight-line segment, but of two of them!

Alice immediately thought of a function that is n2n \geq 2 times as mysterious as a linear function. Formally, she came up with a piecewise linear function f(x)f(x), whose plot consists of nn straight-line segments. Function f(x)f(x) is defined by n+1n+1 points P_0,P_1,,P_n1,P_nP\_0, P\_1, \ldots, P\_{n-1}, P\_n belonging to its plot and allowing to reconstruct it in a following manner. Plot of function f(x)f(x) is a polyline consisting of two rays P_1P_0P\_1 P\_0, P_n1P_nP\_{n-1} P\_n and n2n-2 line segments P_1P_2P\_1 P\_2, \ldots, P_n2P_n1P\_{n-2} P\_{n-1}. Each point P_iP\_i is defined by its Cartesian coordinates (x_i,y_i)(x\_i, y\_i), which are both integers. It is guaranteed that x_i>x_i1x\_i > x\_{i-1} for all ii between 11 and nn, i.e. given polyline is a plot of some function f(x)f(x). Please, refer to the Note section for more details.

Now Alice asks you if it is possible to express her function f(x)f(x) as a linear combination of terms of form xa_i|x - a\_i|. Formally, your task is to find out if there exist two finite sequences of real numbers λ_1,λ_2,,λ_m\lambda\_1, \lambda\_2, \ldots, \lambda\_m and a_1,a_2,,a_ma\_1, a\_2, \ldots, a\_m such that the following equation holds:

f(x)=_i=1mλ_ixa_if(x) = \sum\limits\_{i=1}^m \lambda\_i |x - a\_i|

입력

First line of input contains an integer nn (2n100,0002 \leq n \leq 100\\,000), the number of segments in a polyline that is a plot of Alice function.

In the ii-th of next n+1n+1 lines (indexed from zero) there are two integers x_ix\_i, y_iy\_i (106x_i,y_i106-10^6 \leq x\_i, y\_i \leq 10^6), coordinates of point P_iP\_i.

It is guaranteed that x_0<x_1<<x_nx\_0 < x\_1 < \ldots < x\_n.

출력

If it is possible to express f(x)f(x) as a linear combination of terms of form xa_i|x - a\_i|, print the only word "Yes" (without quotes). Otherwise print the only word "No" (without quotes).

힌트

Pictures for the sample cases are given below: