import math
from collections import deque
N=int(input())
A=[int(x) for x in input().split()]
gcd=A[0]
for i in range(1,N):
    gcd=math.gcd(gcd,A[i])
if gcd!=1:
    print("not coprime")
else:
    flag=1
    maxA=max(A)
    minA=min(A)
    if minA*2>maxA:
        flag=0
    else:
        primeornot=[1]*(maxA+1)
        A=sorted(A)
        deA=deque(A)
        while(len(deA)!=0):
            now=deA.popleft()
            if primeornot[now]==0:
                flag=0
                break
            index=now
            while(index<maxA+1):
                primeornot[index]=0
                index+=now

    if flag==0:
        print("pairwise coprime")
    else:
        print("setwise coprime")