n=int(input())
m=list(map(int,input().split()))
a=max(m)
s=[-1]*(a+1)
for i in range(2,a+1):
    if s[i]==-1:
        for j in range(i,a+1,i):
            s[j]=i
import math
if a==1:
    print("pairwise coprime")
else:
    g=math.gcd(m[0],m[1])
    for i in range(2,n):
        g=math.gcd(g,m[i])
        if g==1:
            break
    if g>1:
        print("not coprime")
    else:
        f=set()
        for i in range(n):
            
            if m[i]>1:
                r=1
                while m[i]>1:
                    k=s[m[i]]
                    if k in f:
                        r=0
                        break
                    while m[i]%k==0:
                        m[i]//=k
                    f.add(k)
            if r==0:
                print("setwise coprime")
                break
        else:
            print("pairwise coprime")
                    
                
        