import math
from functools import reduce

N=int(input())
T=list(map(int,input().split()))

    

    


def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)
S=[]
tmp=gcd_list(T)
if tmp!=1:
    print("not coprime")
else:
    T.sort()
    S=[]
    n=10**6+1
    isprime=[True]*(n+1)
    isprime[0]=False
    isprime[1]=False
    for i in range(len(T)):
        if isprime[T[i]]==True:
            j=T[i]+T[i]
            while j<=n:
                 
                isprime[j] =False
                j=j+T[i]
                
                    
        else:
            print("setwise coprime")
            exit()
    print("pairwise coprime")
    