import math
n=int(input())
a=list(map(int,input().split()))
era=[[] for i in range(10**6+1)]

a.sort()
k=2
while k<(10**6+1)**0.5+1:
  for i in range(k,10**6+1,k):
    era[i].append(k)
  if k==2:
    k+=1
  else:
    k+=2
ans=[]
for i in a:
  ans+=era[i]
ans.sort()
pflag=True
for i in range(len(ans)-1):
  if ans[i]==ans[i+1]:
    pflag=False
    break
if pflag == False:
  setwise=a[0]
  for i in range(1,n):
    setwise=math.gcd(setwise,a[i])
  if setwise == 1:
    print("setwise coprime")
  else:
    print("not coprime")
else:
  print('pairwise coprime')