N = int(input())
A = set(map(int, input().split()))
ex = set()
max_A = max(A)
ans = "pairwise coprime"
for i in range(2, max_A):
    if i in ex:
        continue
    base = i
    cd = base
    cnt = 0
    while(cd < max_A):
        if cd in A:
            cnt += 1
        cd += base
        ex.add(cd)
    if cnt == N:
        ans = "not coprime"
    if cnt:
        ans = "setwise coprime"
print(ans)