import sys
# sys.setrecursionlimit(100000)


def gcd(x: int, y: int) -> int:
    if x < y:
        x, y = y, x
    while y > 0:
        r = x % y
        x, y = y, r
    return x


def input():
    return sys.stdin.readline().strip()


def main():
    n = int(input())
    A = [int(i) for i in input().split()]
    set_gcd = A[0]
    is_pair_gcd = True
    for i in range(1, n):
        set_gcd = gcd(set_gcd, A[i])
        if is_pair_gcd and gcd(A[i], A[i - 1]) == 1:
            continue
        else:
            is_pair_gcd = False

    if is_pair_gcd:
        print("pairwise coprime")
    elif not is_pair_gcd and set_gcd == 1:
        print("setwise coprime")
    else:
        print("not coprime")

    return


if __name__ == "__main__":
    main()
