import math

n = int(input())
l = input()
a = l.split(' ')

chk = 0

for i in range(n):
    for j in range(i+1,n):
        if(math.gcd(int(a[i]), int(a[j]))!=1):
            chk = 1
            break

tmp = int(a[0])

for i in range(1,n):
    tmp = math.gcd(tmp, int(a[i]))


if(chk==0):
    print("pairwise coprime")

elif(tmp==1):
    print("setwise coprime")

else:
    print("not coprime")
