n = int(input())
A = list(map(int, input().split()))
lis = [True for i in range(10**6+1)]
flag = False
for i in range(2, 10**6 + 1):
    if lis[i] == True:
        j = i
        while j <= 10**6:
            lis[j] = False
            j += i
        now = 0
        for a in A:
            if a % i == 0:
                now += 1
        if now == n:
            print("not coprime")
            exit()
        if now > 1:
            flag = True
if flag:
    print("setwise coprime")
else:
    print("pairwise coprime")