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

def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    prime = []
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]


data = get_sieve_of_eratosthenes(max(a))
lst=[0]*(len(data))
for num in a:
    for i,datum in enumerate(data):
        if datum>num:
            break
        if num%datum==0:
            lst[i]+=1
            num//=datum

pair=True
st=True

for i in lst:
    if i>=2:
        pair=False
    if i==n:
        st=False

if pair:
    print("pairwise coprime")
elif st:
    print("setwise coprime")
else:
    print("not coprime")
