import math
N = int(input())
A = list(map(int, input().split()))

A.sort()

t = []

a = A[0]
for i in range(2, min(a, int(math.sqrt(a)) + 1)):
    if a % i == 0:
        t.append(i)
        t.append(a // i)

t.append(a)

ans = 0
for tt in t:
    tmp = 0
    for a in A:
        if a % tt == 0:
            tmp += 1

    ans = max(ans, tmp)
    
if tmp == 1:
    print("pairwise coprime")

elif tmp < N:
    print("setwise coprime")

else:
    print("not coprime")