import sequtils,strutils,strformat,algorithm,math,sugar,bitops
import tables,heapqueue,sets,options,rationals
#proc mod2(n, M: int):int{.used.}=(if M==0: 0 else: ((n mod M) + M) mod M)
proc scanf(fmt: cstring){.header: "<stdio.h>", varargs.}
proc inpStr:string{.used.}=((result=""; var buf: array[256, char]; scanf("%s",
  buf)); for b in buf: ((if b==chr(0): break); result.add(b)))
proc inp:int{.used.}=scanf("%lld", addr result)
template newSeqWith(y, x: int, p: untyped):untyped{.used.}= newSeqWith(y, newSeqWith(x, p))
{.warning[UnusedImport]:off.}

# 素数列挙（なんとかの篩） --------------
var primeMax = 10^6
var primes = newSeqWith(0,0)
var sieve = newSeqWith(primeMax+1,0)
sieve[1] = 1
for i in 2..primeMax:
  if sieve[i] != 0: continue
  primes.add(i)
  sieve[i] = i
  for j in i..(primeMax div i):
    sieve[i*j] = i
proc isPrime(x:int):bool=
  if x<2: return false
  return sieve[x] == x
#----------------------------------------

#let A = @[15,5,1]
#let N = A.len

let N = inp()
let A = newSeqWith(N,inp())
var log = newSeqWith(10^6+5,0)

var pairwise = true
var setwise_cnt = 0

proc solve(N:int,A:seq[int]):string=
  for i in 0..<N:
    #A[i]の約数を記録
    for p in primes:
      if p>A[i]:
        break
      if (A[i] mod p)==0:
        if log[p]>0:
          #約数がかぶってる数が1つはある
          pairwise = false
        log[p] += 1
        #dump(log[p])
        setwise_cnt = setwise_cnt.max(log[p])
  #dump(setwise_cnt)
  var r = "not coprime"
  if pairwise:
    r = "pairwise coprime"
  elif setwise_cnt<N:
    r = "setwise coprime"
  return r

proc solve2(N:int,A:seq[int]):string=
  var all_gcd = A[0]
  for i in 1..<N:
    all_gcd = gcd(all_gcd,A[i]) 
  var pairwise = true
  for j in 0..<N-1:
    for i in (j+1)..<N:
      #dump(gcd(A[i],A[j]))
      if gcd(A[i],A[j])!=1:
        pairwise = false
  
  if pairwise:
    return "pairwise coprime"
  elif all_gcd == 1:
    return "setwise coprime"
  else:
    return "not coprime"

echo solve(N,A)