n=input()
g=0
l=[0]*(10**6+1)
from math import gcd
for i in map(int,input().split()):
    l[i]+=1;g=gcd(i,g)
if g!=1:print('not coprime')
elif all(sum(l[d::d])<=1 for d in range(2,10**6+1)):print("pairwise coprime")
else:print("setwise coprime")