import math
n = int(input())
a = [int(i) for i in input().split()]

chk = [0]*(10**6+1)

for i in range(n):
    if chk[a[i]] == 1 and a[i] >= 2:
        print("not coprime")
        exit()
    chk[a[i]] += 1

flag = True

for i in range(2,10**6+1):
    #tmp = i
    kake = 1
    num = 0
    #print(i)
    while i * kake <= 10**6:
        #print(i)
        if chk[i*kake] == 1:
            if num == 1:
                flag = False
                break
            num = 1
            #break
        kake += 1
gcd_num = math.gcd(a[0],a[1])
        
for i in range(n-2):
    gcd_num = math.gcd(gcd_num,a[i+2])
    
if flag == True:
    print("pairwise coprime")
elif gcd_num == 1:
    print("setwise coprime")
else:
    print("not coprime")