Write a program to determine if the input polygon is convex. The polygon is specified with one line containing N, the number of vertices, then N lines containing the x and y coordinates of each vertex. The vertices will be listed clockwise starting from an arbitrary vertex.
example 1
input
4
0 0
0 1
1 1
1 0
output
convex
example 2
input
4
0 0
2 1
1 0
2 -1
output
concave
example 3
input
8
0 0
0 1
0 2
1 2
2 2
2 1
2 0
1 0
output
convex
x and y are integers, N<1000, and |x|,|y|<1000. You may assume that the input polygon is simple (none of the edges cross, only 2 edges touch each vertex). Shortest program wins.