from math import gcd
N=int(input())
A=list(map(int, input().split()))

gcda=A[0]
gcdais=True
gcdb=A[0]

for i in range(1,N):
    a=A[i]
    if gcd(gcda, a)!=1:
        gcdais=False
    gcda=a

    gcdb=gcd(gcdb, a)

if gcdais:
    print("pairwise coprime")
elif gcdb==1:
    print("setwise coprime")
else:
    print("not coprime")