import sys
from math import sqrt
def SimpleSieve(prime,n):
    arr=[1]*(n+1)
    if len(arr)>0:
        arr[0]=0
    else:
        return
    if len(arr)>1:
        arr[1]=0
    else:
        return
    p=2
    while(p<=n):
        if arr[p]==1:
            prime.append(p)
            for i in range(p**2,n+1,p):
                arr[i]=0
        p+=1
    return

n=int(input())
arr=list(map(int,input().split()))
flag=0
prime=[]
SimpleSieve(prime,(max(arr)//2)+1)
for p in prime:
    val=0
    no=0
    for i in range(n):
        if arr[i]%p==0:
            val+=1
        else:
            no=1
        if val>=2 and flag==0 and no:
            flag=1
            break
        if val==n:
            print("not coprime")
            sys.exit()
if flag:
    print("setwise coprime")
else:
    print("pairwise coprime")
    
    
    
    