import math
aa=int(input())
li = list(map(int,input().split()))
n=max(li)
def prime_2(n):
    l = list(range(2, n + 1))
    l_empty = []
    while len(l) >= 1:
        l_empty.append(l[0])
        s = set(l) - {j for j in l if j%l[0] == 0}
        list_s = list(s)
        l = sorted(list_s)
    return l_empty
primelist=prime_2(n)

for i in range(len(primelist)):
    cnt=0
    for k in li:
        if k%primelist[i]==0:
            cnt+=1
            if cnt==2:
                ans = li[0]
                for i in range(1,aa):
                    ans = math.gcd(ans, li[i])
                if ans==1:
                    print("setwise coprime")
                    exit()
                else:
                    print("not coprime")
                    exit()
print("pairwise coprime")