import math
N = int(input())
lsA = list(map(int,input().split()))

def primels(A):
    lsP = []
    for i in range(2, int(-(-A**0.5//1))+1):
        if A%i == 0:
            lsP.append(i)
    return set(lsP)

ans = ''
setwa = set()
ii = 0
for i in range(N):
    setA = primels(lsA[i])
    if (setA & setwa) != set():
        break    
    setwa = setwa | setA
    ii += 1
if ii == N:
    ans = 'pairwise coprime'

if ans == '':
    gcd = lsA[0]
    for i in range(1,N):
        gcd = math.gcd(gcd,lsA[i])
        if gcd == 1:
            ans = 'setwise coprime'
            break

if ans == '':
    ans = 'not coprime'
print(ans)
