def factorization(n):
    arr = []
    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.append(i)

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

    if arr==[]:
        arr.append(n)

    return arr

import math

Sosu = []

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

ans = "pairwise coprime"
for i in range(N):
    for j in Sosu:
        if A[i]%j == 0:
            ans = 1
            break
    if ans == 1:
        break
    Sosu.extend(factorization(A[i]))
    
if ans == 1:
    M = A[0]
    for i in range(1,N):
        M = math.gcd(M, A[i])
        if M == 1:
            break
    if M == 1:
        ans = "setwise coprime"
    else: ans = "not coprime"

print(ans)