def gcd(a, b): 
    if (a == 0 or b == 0): 
        return False
    if (a == b): 
        return a 
    if (a > b): 
        return gcd(a-b, b) 
    return gcd(a, b-a) 
def coprime(a, b) : 
    return (gcd(a, b) == 1) 
n=int(input())
lst=list(map(int,input().strip().split()))
flag=0 
for i in range(0,n):
    for j in range(i+1,n):
        a=coprime(lst[i],lst[j])
        if(a==False):
            flag=1 
            break 
if(flag==0):
    print("pairwise coprime")
else:
    g=gcd(lst[0],lst[1]) 
    for k in range(2,n):
        g=gcd(g,lst[k])
    if(g==1):
        print("setwise coprime")
    else:
        print("not coprime")
            