import math 
from functools import reduce
N = int(input())
A = list(map(int, input().split()))
ans = ["pairwise coprime", "setwise coprime ", "not coprime"]

def gcd_list(numbers):
    return reduce(math.gcd, numbers)
  
if gcd_list(A) != 1:
  print(ans[2])
  quit()
  
m = max(A)
fac = [1] * (m + 1)
primeNum = []
for i in range(2, m + 1):
    if fac[i] != 1:
      continue
    primeNum.append(i)
    for j in range(i,m+1,i):
      fac[j] = i  
used = [0] * len(primeNum)     
#print(fac)
#print(primeNum)
for i in range(N):
  now = A[i]
  q = []
  #print(now, D[now - 1])
  while now != fac[now]:
    if fac[now] not in q:
      q.append(fac[now])
    now = int(now / fac[now])
  q.append(now)
  #print(q)    
  for i in q:
    if i in primeNum:
      if used[primeNum.index(i)] == 0:
        used[primeNum.index(i)] = 1
      else:
        print(ans[1])
        quit()  

print(ans[0])
