import sys
import math
def Ii():return int(sys.stdin.readline().rstrip())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))
n = Ii()
a = Li()
sc = 0
g = math.gcd(a[0],a[1])
for i in range(n-2):
  g = math.gcd(g,a[i+2])
  if(g == 1):
    sc = 1
    break
    
if(sc == 0):
  print('not coprime')
  exit(0)

isPrim = [0]*(max(a)+1)

def div(x,d):
  if(x%d == 0):
    x /= d
    isPrim[d] += 1
  return x

def prim(x):
  x = div(x,2)
  if(isPrim[2] > 1): return 1
  x = div(x,3)
  if(isPrim[3] > 1): return 1    
  itr = int(math.sqrt(x))
  for i in range(5,itr,6):
    x = div(x,i)
    if(isPrim[i] > 1): return 1
    x = div(x,i+2)
    if(isPrim[i+2] > 1): return 1
  return 0

    
for i in range(n):
  if(prim(a[i])):
    print('setwise coprime')
    exit(0)  
  
print('pairwise coprime')
