import math

n = int(input())
a = list(map(int, input().split()))

def gen_primes(limit):
    p = [] # それまでに生成した素数
    for i in range(2, limit+1):
        if i == 2 or all([i%j != 0 for j in p if j <= int(i**.5)]):
            p.append(i)
            yield i

for p in gen_primes(int(max(a)**.5)):
    if sum([i%p == 0 for i in a]) >= 2:
        break
else:
    print('pairwise coprime')
    exit()

gcd = a[0]
for i in a[1:]:
    gcd = math.gcd(gcd, i)
    if gcd == 1:
        print('setwise coprime')
        break
else:
    print('not coprime')
