def factorize(x):
    f = {}
    if x%2==0: f[2]=0
    while x%2==0:
        f[2]+=1
        x//=2
    
    p = 3
    while x>=p*p:
        if x%p==0: f[p]=0
        while x%p==0:
            f[p]+=1
            x//=p
        p+=2
    if x>1: f[x]=1
    return f

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

F = {0:0}

for a in A:
    for f in set(factorize(a)):
        if f not in F: F[f] = 0
        F[f] += 1

m = max(F.values())
if m<=1:
    print('pairwise coprime')
elif m<N:
    print('setwise coprime')
else:
    print('not coprime')
