from math import gcd

n=int(input())
a=list(map(int, input().split()))
ans="not coprime"
G=a[0]
for i in range(n):
    G=gcd(G,a[i])
if G==1:
    ans="setwise coprime"
for i in range(n):
    for j in range(i+1,n):
        if gcd(a[i],a[j])!=1:
            break
    else:
        continue
    break
else:
    ans="pairwise coprime"
print(ans)