Convex polygon
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Determine whether a given polygon is convex.
Input
The first line of one number - N (3 ≤ N ≤ 100000). Next N lines in a pair of numbers - the coordinates of another vertex simple polygon in order to circumvent or counterclockwise. All coordinates are integers modulo not exceeding 10000.
Output
One line of "YES", if given polygon is convex, and "NO" otherwise.
Examples
Input #1
Answer #1
Submissions 2K
Acceptance rate 22%