def cal(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+2):
        if temp%i==0:
            while temp%i==0:
                temp //= i
            arr.append(i)

    return arr

N = int(input())
A = list(map(int,input().split()))
    
check = [0] * 1000000
flag = False

ans = "pairwise coprime"

for i in range(N - 1):
    temp = cal(A[i])
    for j in (temp):
        if check[j - 1] != 0:
            ans = "setwise coprime"
        check[j - 1] += 1
            

temp = cal(A[-1])

for j in (temp):
    if check[j - 1] == 0:
        pass
    elif check[j - 1] == N - 1:
        print("not coprime")
        break
else:
    print(ans)
