import math as mt 
  
MAXN = 1000001
  
# stores smallest prime factor for 
# every number 
spf = [0 for i in range(MAXN)] 
  
# Calculating SPF (Smallest Prime Factor)  
# for every number till MAXN. 
# Time Complexity : O(nloglogn) 
def sieve(): 
    spf[1] = 1
    for i in range(2, MAXN): 
          
        # marking smallest prime factor  
        # for every number to be itself. 
        spf[i] = i 
  
    # separately marking spf for  
    # every even number as 2 
    for i in range(4, MAXN, 2): 
        spf[i] = 2
  
    for i in range(3, int(mt.ceil(mt.sqrt(MAXN)))): 
          
        # checking if i is prime 
        if (spf[i] == i): 
              
            # marking SPF for all numbers 
            # divisible by i 
            for j in range(i * i, MAXN, i):  
                  
                # marking spf[j] if it is  
                # not previously marked 
                if (spf[j] == j): 
                    spf[j] = i 
  
# A O(log n) function returning prime  
# factorization by dividing by smallest  
# prime factor at every step 
def getFactorization(x): 
    d1={}
    while (x != 1): 
        d1[spf[x]]=0
        x = x // spf[x] 
  
    return d1.keys()
def gcd(a,b):
    while b:
        a,b=b,a%b
    return a
# Driver code 
  
# precalculating Smallest Prime Factor 
sieve()
n=int(input())
d={}
flag=1;val=-1
a=[int(i) for i in raw_input().split()]
for i in range(n):
    x=a[i]
    if val==-1:
        val=x
    val=gcd(val,x)
    ret=getFactorization(x)
    for j in ret:
        d[j]=d.get(j,0)+1
for i in d.keys():
    if i!=1 and d[i]>1:
        flag=0
if val!=1:
    print("not coprime")
elif flag:
    print("pairwise coprime")
else:
    print("setwise coprime")
        
