from math import gcd

def prime_factorize(n):
    a = set()
    for i in range(2, int(n**0.5)+1):
        while n%i == 0:
            a.add(i)
            n //= i
    if n != 1:
        a.add(n)
    return a

n = int(input())
a = list(map(int, input().split()))
c0 = 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 c0 is False:
    print('pairwise coprime')
else:
    b = gcd(a[0], a[1])
    for i in range(2, n):
        b = gcd(b, a[i])
    if b == 1:
        print('setwise coprime')
    else:
        print('not coprime')

        
