import numpy as np

import numba

from numba import njit, b1, i4, i8, f8



@njit((i8, i8[:]), cache=True)

def main(N,A):

  Amax = np.max(A)

  lis = np.zeros(Amax+1, np.int64)

  for i in range(N):

    lis[A[i]] += 1

  setwise = False

  for t in range(2,Amax+1):

    cnt = np.sum(lis[t:Amax+1:t])

    if cnt==N:

      return 'not'

    if 2<=cnt<N:

      setwise=True

  if setwise==True:

    return 'setwise'

  return 'pairwise'



N = int(eval(input()))

A = np.array(list(map(int, input().split())))

print((main(N,A)+' coprime'))



def sieve(n):

  is_prime = [True for _ in range(n+1)]

  is_prime[0] = False

  for i in range(2, n+1):

    if is_prime[i-1]:

      j = 2 * i

      while j <= n:

        is_prime[j-1] = False

        j += i

  table = [i for i in range(1, n+1) if is_prime[i-1]]

  return table



N = int(eval(input()))

A = list(map(int, input().split()))

Amax = max(A)

lis = [0]*(Amax+1)

for i in range(N):

  lis[A[i]] += 1

table = sieve(Amax)

setwise = False

for t in table:

  cnt = sum(lis[t:Amax+1:t])

  if cnt==N:

    print('not coprime')

    break

  if 2<=cnt<N:

    setwise=True

else:

  if setwise==True:

    print('setwise coprime')

  else:

    print('pairwise coprime')

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


@njit((i8, i8[:]), cache=True)
def main(N, A):
    Amax = np.max(A)
    lis = np.zeros(Amax + 1, np.int64)
    for i in range(N):
        lis[A[i]] += 1
    setwise = False
    for t in range(2, Amax + 1):
        cnt = np.sum(lis[t : Amax + 1 : t])
        if cnt == N:
            return "not"
        if 2 <= cnt < N:
            setwise = True
    if setwise == True:
        return "setwise"
    return "pairwise"


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

def sieve(n):
    is_prime = [True for _ in range(n + 1)]
    is_prime[0] = False
    for i in range(2, n + 1):
        if is_prime[i - 1]:
            j = 2 * i
            while j <= n:
                is_prime[j - 1] = False
                j += i
    table = [i for i in range(1, n + 1) if is_prime[i - 1]]
    return table


N = int(eval(input()))
A = list(map(int, input().split()))
Amax = max(A)
lis = [0] * (Amax + 1)
for i in range(N):
    lis[A[i]] += 1
table = sieve(Amax)
setwise = False
for t in table:
    cnt = sum(lis[t : Amax + 1 : t])
    if cnt == N:
        print("not coprime")
        break
    if 2 <= cnt < N:
        setwise = True
else:
    if setwise == True:
        print("setwise coprime")
    else:
        print("pairwise coprime")

-import numpy as np -import numba -from numba import njit, b1, i4, i8, f8 - - -@njit((i8, i8[:]), cache=True) -def main(N, A): -    Amax = np.max(A) -    lis = np.zeros(Amax + 1, np.int64) -    for i in range(N): -        lis[A[i]] += 1 -    setwise = False -    for t in range(2, Amax + 1): -        cnt = np.sum(lis[t : Amax + 1 : t]) -        if cnt == N: -            return "not" -        if 2 <= cnt < N: -            setwise = True -    if setwise == True: -        return "setwise" -    return "pairwise" +def sieve(n): +    is_prime = [True for _ in range(n + 1)] +    is_prime[0] = False +    for i in range(2, n + 1): +        if is_prime[i - 1]: +            j = 2 * i +            while j <= n: +                is_prime[j - 1] = False +                j += i +    table = [i for i in range(1, n + 1) if is_prime[i - 1]] +    return table -A = np.array(list(map(int, input().split()))) -print((main(N, A) + " coprime")) +A = list(map(int, input().split())) +Amax = max(A) +lis = [0] * (Amax + 1) +for i in range(N): +    lis[A[i]] += 1 +table = sieve(Amax) +setwise = False +for t in table: +    cnt = sum(lis[t : Amax + 1 : t]) +    if cnt == N: +        print("not coprime") +        break +    if 2 <= cnt < N: +        setwise = True +else: +    if setwise == True: +        print("setwise coprime") +    else: +        print("pairwise coprime")