def gcd(x,y):
    if y == 0:
        return x
    else:
        return gcd(y,x%y)
def lcm(x,y):
    return x*y//gcd(x,y)


n=int(input())
a=list(map(int,input().split()))
b=gcd(a[0],a[1])
res1=True
c=[1]*n
for i in range(1,n):
    c[i]=lcm(c[i-1],a[n-i])

for i in range(n-1):
    d=a[i];e=a[i+1];f=c[n-i-1]
    if gcd(d,f)==1:
        continue
    else:
        res1=False
        b=gcd(b,e)

if res1:
    print("pairwise coprime")
elif b==1:
    print("setwise coprime")
else:
    print("not coprime")
