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

def factorization(n):
    arr = set()
    for i in range(2,int(n**0.5) + 2):
        if n%i == 0:
            arr.add(i)
    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)
    
        