import sys
sys.setrecursionlimit(10**7)

input = sys.stdin.readline


def main():
    N = int(input())

    iwashi = []

    ng_list = []

    for i in range(N):
        ai, bi = [int(v) for v in input().split()]
        iwashi.append((ai, bi))

    for i in range(N):
        ng = 0
        ai, bi = iwashi[i]
        for j in range(i + 1, N):
            aj, bj = iwashi[j]
            if ai * aj + bi * bj == 0:
                ng |= 1 << j
        ng_list.append(ng)

    memo = [[{}, {}] for _ in range(N)]

    def search(i, closed, choice):
        if i >= N:
            return choice

        if closed in memo[i][choice]:
            return memo[i][choice][closed]

        count = search(i + 1, closed, choice)
        if (closed & (1 << i)) == 0:
            count += search(i + 1, closed | ng_list[i], 1)

        memo[i][choice][closed] = count
        return count

    count = search(0, 0, 0)
    print(count)


main()
