import math
n=int(input())
A=list(map(int,input().split()))
ans=A[0]
X=[0]*(max(A)+1)
def div(x):
    if x%2==0:
        x//=2
        if X[2]!=0:
            return False
        else:
            X[2]+=1
    for i in range(3,int(x**0.5)+1,2):
        if x%i==0:
            x//=i
            if X[i]!=0:
                return False
            else:
                X[i]+=1
    return True



for i in range(1,n):
    ans=math.gcd(ans,A[i])

if ans!=1:
    print('not coprime')
else:
    ans='pairwise coprime'
    for a in A:
        if not div(a):
            ans='setwise coprime'
            break
    print(ans)