n=int(input())
a=list(map(int,input().split()))
import sys
def gcd(a,b):
  if b==0:
    return a
  else:
    return gcd(b,a%b)

def setwise_coprime(a):
  ans=a[0]
  for i in range(1,n):
    ans=gcd(ans,a[i])
  return ans



  


for i in range(n-1):
  for j in range(i+1,n):
    num=gcd(a[i],a[j])
    if num!=1:
      if setwise_coprime(a)==1:
        print("setwise coprime")
        sys.exit()
      else:
        print("not coprime")
        sys.exit()
print("pairwise coprime")

        










