from math import gcd

# 10**3まで素数列挙
N = 1000
L = list(range(2,N+1))
p = list()
while L[0]**2<=N:
    tmp = L[0]
    p.append(tmp)
    L = [e for e in L if e%tmp!=0]
p = p + L

def function(n):
    memo = set()
    for i in p:
        if n % i == 0:
            c = 0
            while n % i == 0:
                c += 1
                n //= i
            memo.add(i)
    if n > 1:
        memo.add(n)
    return memo

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

# n個の数のgcd
total_gcd = A[0]
for a in A:
    total_gcd = gcd(total_gcd, a)
    if total_gcd == 1:
        break


if total_gcd == 1:  # pairwiseか setwise
    setA = set(A)
    if len(setA) > len(p)+10: # 固有の
        print("setwise coprime")
        exit()

    total = set()
    cnt = 0
    for a in A:
        s = function(a)
        total = total | s
        cnt += len(s)

    if len(total) != cnt:  # どこかに共通あり
        print("setwise coprime")
    else:
        print("pairwise coprime")

else: # setwiseかnot
    print("not coprime")
    exit()