import math
n = int(raw_input())
arr = raw_input()  
v = list(map(int,arr.split(' ')))

def gcd(x,y):
    if y==0:
        return x
    else:
        return gcd(y,x%y)
l=v[0]
g=v[0]
p=v[0]
for i in range(1,len(v)):
    l=l*v[i]/gcd(l,v[i])
    g=gcd(g,v[i])
    p*=v[i]
if p==l:
    print "pairwise coprime"
elif g==1:
    print "setwise coprime"
else:
    print "not coprime"
