from math import hypot, acos, pi

def vectorProduct(x1, y1, x2, y2):
    return x1 * y2 - x2 * y1

def vectorProductD(a, b, c, d):
    return vectorProduct(b[0] - a[0], b[1] - a[1], d[0] - c[0], d[1] - c[1])

def intersect(p1, p2, q1, q2):
    return vectorProductD(q1, p1, q1, q2) * vectorProductD(q1, p2, q1, q2) < 0 \
        and vectorProductD(p1, q1, p1, p2) * vectorProductD(p1, q2, p1, p2) < 0

def valid(a, b, points):
    return not any(intersect(a, b, points[i], points[(i + 1) % len(points)]) for i in range(len(points)))

def angle(a, b, c):
    ux = a[0] - b[0]
    uy = a[1] - b[1]
    vx = c[0] - b[0]
    vy = c[1] - b[1]
    ret = acos((ux * vx + uy * vy) / hypot(ux, uy) / hypot(vx, vy))
    if vectorProduct(ux, uy, vx, vy) > 0:
        return 2 * pi - ret
    return ret

def count(points):
    if len(points) == 3 or len(points) == 2:
        return 1
    frozen = frozenset(points)
    if frozen in memo:
        return memo[frozen]
    a = points[0]
    b = points[1]
    result = 0
    for j in range(2, len(points)):
        c = points[j]
        if vectorProductD(a, b, a, c) > 0 and \
           angle(a, b, c) <= angle(a, b, points[2]) and \
           angle(b, a, c) >= angle(b, a, points[-1]) and \
           valid(a, c, points) and valid(b, c, points):
            result += count(points[1:j + 1]) * count(points[j:] + [points[0]])
    memo[frozen] = result
    return result


for filename in ["triang-rect.in", "triang-penta.in", "triang-small.in", "triang-arrow.in", "triang-big.in"]:
    memo = {}
    with open(filename) as f:
        points = [tuple(int(x) for x in line.split()) for line in f]
    print(count(points), "triangulations")