#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

#from fractions import gcd

def gcd(a, b): 
    if a == 0: return b 
    if b == 0: return a 
    k = 0
    while ((a | b) & 1) == 0: 
        a >>= 1
        b >>= 1
        k += 1
    while (a & 1) == 0: 
        a >>= 1
    while b:  
        while (b & 1) == 0: 
            b >>= 1
        if a > b : 
            a,b = b,a
        b = b - a 
    return a << k 

n = inp()
x = ip()
ans = 'pairwise coprime'
t = x[0]
for i in range(1,n):
    t = gcd(t,x[i])
    #print(t)
    if t != 1:
        ans = 'setwise coprime'
if t != 1:
    ans = 'not coprime'
else:
    ans = 'pairwise coprime'
    for i in range(n-1):
        for j in range(i+1,n):
            t = gcd(x[i],x[j])
            if t != 1:
                ans = 'setwise coprime'
                break
        if ans == 'setwise coprime':
            break
print(ans)
