import math
N = int(input())
A = list(map(int, input().split()))
ans1 = "pairwise coprime"
ans2 = "setwise coprime"
ans3 = "not coprime"

def func(number):
    factor = []
    div = 2
    s = math.sqrt(number)
    while div < s:
        div_cnt = 0
        while number % div == 0:
            div_cnt += 1
            number //= div
        if div_cnt != 0:
            factor.append(div)
        div += 1
    if number > 1:
        factor.append(number)
        
    return set(factor)

a = math.gcd(A[0], A[1])
for i in range(2, N):
    a = math.gcd(a, A[i])

if a==1:
    b = True
    l = func(A[0])
    for i in range(1, N):
        
        if l&func(A[i])==set():
            l=l|func(A[i])
        else:
            b=False
            break
    if b:
        print(ans1)
    else:
        print(ans2)
        
        
    
else:
    print(ans3)

