"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""

def factorization(n):
    arr = set()
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.add(i)

    if temp!=1:
        arr.add(temp)

    if len(arr) == 0:
        arr.add(n)

    return arr


n = int(input())
a = list(map(int,input().split()))
ans = "pairwise coprime"
yakusu = []

for i in range(n):
    arr = factorization(a[i])
    yakusu.append(arr)

for i in range(n-1):
    for j in range(i+1,n):
        s1 = yakusu[i] & yakusu[j]
        if len(s1) != 0:
            ans = "setwise coprime"
            break

s2 = yakusu[0]

for i in range(1,n):
    s2 = s2 & yakusu[i]

if len(s2) != 0:
    ans = "not coprime"

print(ans)
    
        