import math

n=int(input())
a=list(map(int,input().split()))

gx=list()

jud=1

for i in range(n-1):
    g = math.gcd(a[i], a[i+1])
    if g!=1:
        gx.append(g)
        if gx[0]!=g:
            jud=0

if len(gx)==0:
    print("pairwise coprime")
elif len(gx)==n-1 and jud==0:
    print("setwise coprime")
else:
    print("not coprime")
