import math

n = int(input())
a = list(map(int,input().split()))

lcm = a[0]
pwise_flag = True
for i in range(1,n):
    gcd = math.gcd(lcm,a[i])
    if gcd != 1:
        pwise_flag = False
        break
    else:
        lcm = lcm*a[i]
        
if pwise_flag:
    print('pairwise coprime')
else:
    min_a = min(a)
    swise_flag = False
    
    pf={}
    for i in range(2,int(min_a**0.5)+1):
        while min_a%i==0:
            pf[i]=pf.get(i,0)+1
            min_a//=i
    if min_a>1:pf[min_a]=1
    
    
    for i in range(n):
        del_keys = []
        for prime in pf.keys():
            if a[i]%prime != 0:
                del_keys.append(prime)
        for i in del_keys:
            del pf[i]
    
    if pf.keys():
        print('not coprime')
    else:
        print('setwise coprime')