import math

N = int(input())
A_L = [int(x) for x in input().split()]
A_L.sort()


def get_sieve_of_eratosthenes(n):
    if n < 2:
        return []
    prime = []
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]


f_l = get_sieve_of_eratosthenes(A_L[-2])

flag = False
for f in f_l:
    _len = len([e for e in A_L if e % f == 0])
    if _len == N:
        print("not coprime")
        exit(0)
    elif _len > 1:
        flag = True
if flag:
    print("setwise coprime")
else:
    print("pairwise coprime")
