from functools import reduce
from math import gcd

def sieve(L,R):
    if L<2:L=2
    flag=[0]*(R+1)
    for i in range(2, int(R**.5)+5):
        if flag[i] == 1:continue
        for j in range(i*2,R+1, i):
            if flag[j] == 1:continue
            if j % i == 0:
                flag[j] = 1
    
    return [i for i in range(L,R+1) if flag[i] == 0]
  
N=int(input())
*A,=map(int,input().split())

primes = sieve(2,10**3+5)
num = [0]*(10**6+5)
for i in range(N):
  num[A[i]] += 1

flag=0
for p in primes:
  count=0
  for d in range(p,10**6+5,p):
    count += num[d]
  if count > 1:
    flag=1
    break
  
if flag==0:
  print('pairwise coprime')
elif reduce(gcd,A)==1:
  print('setwise coprime')
else:
  print('not coprime')