import numpy as np
import numba
from numba import njit, b1, i4, i8, f8

@njit((i8,i8[:]), cache=True)
def main(N,A):
  Amax = A.max()
  lis = np.zeros(Amax+1, np.int64)
  table = np.full(Amax+1,Amax+1,np.int64)
  for i in range(2, Amax+1):
    table[i::i] = np.minimum(table[i::i],i)
  for i in range(N):
    p = A[i]
    while p>1:
      q = table[p]
      lis[q]+=1
      while p%q==0:
        p //= q
  setwise = False
  for i in range(N):
    if lis[i]==N:
      return 'not'
    if 2<=lis[i]<N:
      setwise=True
  if setwise==True:
    return 'setwise'
  return 'pairwise'

N = int(input())
A = np.array(list(map(int, input().split())))
print(main(N,A)+' coprime')
