def gcd(U,Q):
  if Q==0:
    return U
  return gcd(Q,U%Q)
def lcm(U,Q):
  return U/gcd(U,Q)*Q
N=input()
N=int(N)
a=list(map(int,input().split()))
b,c,d=0,1,1
for i in range(N):
  b=gcd(a[i],b)
  c=lcm(a[i],c)
  d*=a[i]
if b!=1:
  print("not coprime")
elif c!=d:
  print("setwise coprime")
else:
  print("pairwise coprime")