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)

b = 1
for i in range(n-1):
  b *= a[i]
  g = math.gcd(b%a[i+1],a[i+1])
  if(g > 1):
    print('setwise coprime')
    exit(0)    
  
print('pairwise coprime')
