import itertools
import math
n=int(input())
a=list(map(int, input().split()))
ans=0
c=0

for v in itertools.combinations(a, 2):
    c+=1
    #print(math.gcd(v[0],v[1]))
    if math.gcd(v[0],v[1]) == 1:
        ans += 1

if c==ans:
    print('pairwise coprime')
    exit()

m=min(a)
pf={}
for i in range(2,int(m**0.5)+1):
    while m%i==0:
        pf[i]=pf.get(i,0)+1
        m//=i
if m>1:pf[m]=1
#print(pf)

tmp = 0
for v in pf:
    for i in range(len(a)):
        tmp += a[i]%v
if tmp==0:
    print('not coprime')
    exit()
else:
    print('setwise coprime')
    exit()