import numpy as np

n=int(input())
a=list(map(int,input().split()))

#if np.lcm.reduce(a)==np.prod(a):
#    print("pairwise coprime")
#elif np.gcd.reduce(a)==1:
#    print("setwise coprime")
#else:
#    print("not coprime")

l=np.lcm.reduce(a)
p=np.prod(a)
g=np.gcd.reduce(a)

if l==p:
    print("pairwise coprime")
elif g==1:
    print("setwise coprime")
else:
    print("not coprime")
