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()
a=list(map(int,input().split()))
b,c,d=0,0,1
for i in range(1,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")
