You are given a polygon with sides without self-intersections. In how many ways can you triangulate it?
Input consists of several cases with only integer numbers. Each case begins with , followed by the coordinates of the vertices given in counterclockwise order. Assume and . The given polygons are such that no triangulation contains a degenerate triangle.
For every case, print the number of triangulations modulo .
Input
4 0 0 1 0 1 1 0 1 4 0 0 100000 100000 200000 0 100000 200000 7 2 0 3 2 2 4 0 5 -2 4 -3 2 -2 0 8 1 1 0 3 -1 1 -3 0 -1 -1 0 -3 1 -1 3 0 8 0 0 10 0 10 10 0 10 1 9 9 9 9 1 1 1
Output
2 1 42 30 8