import math
from functools import reduce

N = int(input())
A = list(map(int, input().split()))
sieve = list(range(2, 1001))
prime = []
while len(sieve) > 0:
    p = sieve[0]
    prime.append(p)
    sieve = [s for s in sieve if s % p != 0]
factors = {}
pairwise = True
for a in A:
    for p in prime:
        if a % p == 0:
            if p in factors:
                pairwise = False
                break
            else:
                factors[p] = True
    if not pairwise:
        break
if pairwise:
    print('pairwise coprime')
else:
    gcd = reduce(math.gcd, A)
    if gcd == 1:
        print('setwise coprime')
    else:
        print('not coprime')
