import functools
import math

n=int(input())
values=list(map(int,input().split()))
setgcd = functools.reduce(math.gcd, values)

flag=True
for i in range(n-1):
  if flag==False:
    break
  for j in range(i+1,n):
    if math.gcd(values[i],values[j])!=1:
      flag=False
      #print(values[i],values[j])
      break

if flag:
  print("pairwise coprime")
elif setgcd==1:
  print("setwise coprime")
else:
  print("not coprime")