e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

Five for week 06

Convex polygon

Determinewhether agivenpolygonis convex.

Input

The firstline ofonenumber - N (3N100000). NextN linesina pairof numbers -the coordinates ofanothervertexsimplepolygoninordertocircumventorcounterclockwise.Allcoordinatesare integersmodulonotexceeding10000.

Output

Oneline of "YES", ifgivenpolygonis convex,and "NO" otherwise.

Time limit 1 second
Memory limit 64 MiB
Input example #1
3
0 0
0 1
1 0
Output example #1
YES