import math

def calc_spf(n):
    num = list(range(2,n+1))
    #1の扱いは気にしない
    spf = [0]*n
    
    while len(num)>0:
        p = num.pop(0)
        delta = p
        spf[p-1]=p
        p *= delta
        while p<=n:
            if p in num and spf[p-1]==0:
                spf[p-1]=delta
                num.remove(p)
            p += delta
    return spf

def get_prime(n,spf):
    if n==1:
        return {1}
    ans = []
    while n > 1:
        tmp = spf[n-1]
        ans.append(tmp)
        n //= tmp
    return set(ans)

n = int(input().rstrip())
a = list(map(int,input().rstrip().split()))
b = a[:]
pgcd = True
sgcd = a[n-1]
spf = calc_spf(max(a))
b[n-1] = get_prime(a[n-1],spf)
tmp = b[n-1]
for i in range(0,n-1):
    sgcd = math.gcd(sgcd, a[i])
    b[i] = get_prime(a[i],spf)
    if pgcd and len(tmp&b[i]) >0:
        pgcd = False
    tmp = tmp | b[i]
if sgcd!=1:
    print('not coprime')
elif pgcd:
    print('pairwise coprime')
else:
    print('setwise coprime')