from math import gcd


def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return set(fct)


n = int(input())
a = list(map(int, input().split()))
b = a[0]
for i in range(1, n):
    b = gcd(b, a[i])
    if b == 1:
        break
else:
    print("not coprime")
    exit()

a = list(map(factorize, a))
wa = a[0]
cnt = 0
flag = 0
for i in range(1, n):
    if len(wa & a[i]) > 0 and flag == 0:
        flag = 1
    wa = wa | a[i]

if flag:
    print("setwise coprime")
else:
    print("pairwise coprime")

