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
proc getPrimeBase(x:int):int=
  return sieve[x]
#----------------------------------------

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

var pairwise = true
var setwise_cnt = 0

for i in 0..<N:
  #dump((A[i],getPrimeBase(A[i])))

  if log[getPrimeBase(A[i])]:
    pairwise = false
  else:
    setwise_cnt += 1
    log[getPrimeBase(A[i])] = true
  #dump(pairwise)
  #dump(setwise_cnt)

if pairwise:
  echo "pairwise coprime"
elif setwise_cnt>=2:
  echo "setwise coprime"
else:
  echo "not coprime"
