from math import gcd

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

data = [0]*(10**6+1)

for a in A:
    data[a] += 1

pair = True

for i in range(1,10**6+1):
    check = 0
    for j in range(1,(10**6)//i+1):
        check += data[i*j]
    if check>1:
        pair = False

if pair:
    print("pairwise coprime")
else:
    res=A[0]
    for i in range(1,N):
        res=gcd(res,A[i])
    if res==1:
        print("setwise coprime")
    else:
        print("not coprime")
