Segments
While browsing the internet, Mikhailych stumbled upon a puzzle that piqued his interest. The challenge was to form a convex polygon using a set of given line segments. The catch was that these segments could only be moved around using a mouse; they couldn't be rotated, possibly due to a poorly designed interface. After spending half an hour unsuccessfully trying to arrange the segments, Mikhailych found his screen cluttered with various open web pages. Frustrated, he decided to write a program to quickly determine if such a puzzle could be solved.
Your task is to create a similar program, in case you come across such a challenge.
Input
The first line contains the number of segments n (3 ≤ n ≤ 50). Each of the following n lines contains two integers x and y (-100 ≤ x, y ≤ 100), representing the coordinates of the endpoints of the segments. The origin of all segments is considered the origin of coordinates.
Output
Print YES if it is possible to form a convex polygon whose boundary consists of all the given segments, and NO otherwise.