import math,sys

n=int(input())
Ns=list(map(int, input().split()))


ans_p="pairwise coprime"
ans_s="setwise coprime"
ans_n="not coprime"

max_n=int(math.sqrt(10**6))+20
count=[False for _ in range(max_n)]

def fac(x):
    i=2
    flag=True
    while x>1:
        ind=0
        while x%i == 0:
            ind+=1
            x=int(x/i)
        if ind>0:
            if count[i]:
                flag=False
            else:
                count[i]=True
        i+=1
    if flag:
        return True
    else:
        return False

flag=True
for each in Ns:
    flag_2=fac(each)
    if not flag_2:
        flag=False
        break

if flag:
    print(ans_p)
    sys.exit()

gcd_ans=Ns[0]
for i in range(1,n):
    gcd_ans= math.gcd( gcd_ans , Ns[i])

if gcd_ans==1:
    print(ans_s)
else:
    print(ans_n)