from math import *
n,*a=map(int,open(0).read().split())
a.sort()
b=0
for i,j in zip(a,a[1:]):
    if gcd(i,j)==1:
        b+=1
if b==n-1:print("pairwise coprime");exit()
c=a[0]
for i in a:
    c=gcd(c,i)
    if c==1:print("setwise coprime");exit()
print("not coprime")