n=int(input())
a=list(map(int,input().split()))

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

def erast(n):
  num_set=set()
  prime_set=set()
  for i in range(2,n+1):
    if i not in num_set:
      prime_set.add(i)
      for j in range(i*i,n+1,i):
        num_set.add(j)
  s=list(prime_set)
  return s

def is_prime(n):
  if n==1:
    return False
  if n==2:
    return True
  else:
    for i in range(int(math.sqrt(n))+1):
      if n%i==0:
        return False
    return True
  
check=set()
if setwise_coprime(a)==1:
  s=erast(1000000)
  s.sort()
  for i in range(n):
    if a[i]!=1:
      for j in range(len(s)):
        if a[i]%s[j]==0:
          if s[j] in check:
            print("setwise coprime")
            sys.exit()
          else:
            check.add(s[j])
            
  print("pairwise coprime")    
else:
  print("not coprime")
  
  



      
      
    
