from math import gcd

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return list(set(a))

n = int(input())
a = list(map(int, input().split()))
c0, c1 = False, False
vals = []

for i, j in enumerate(a):
    vals += prime_factorize(j)
    if len(vals) != len(set(vals)) and c0 is False:
        c0 = True
    if i < n-1 and c1 is False:
        if gcd(a[i], a[i+1]) > 1:
            c1 = True
            
if c0 is True and c1 is True:
    print('not coprime')
elif c0 is False:
    print('pairwise coprime')
elif c1 is False:
    print('setwise coprime')

        
