import sys

input = sys.stdin.readline
from math import gcd

primes = set([i for i in range(2,10**6+1)])

for i in range(2,1001):
  for j in range(i*2,10**6+1,i):
    if j in primes:
      primes.remove(j)
      
#primes = list(set(primes))
#print(primes[:10])

n = int(input())
a = list(map(int,input().split()))

ok = 1
tmp = a[0]

for i in range(1,n):
  tmp = gcd(tmp,a[i])
  
if tmp>1:
  print('not coprime')
else:
  used = set([])
  ok = 1
  
  for num in a:
    if num in primes:
      if num in used:
        ok = 0
      else:
        used.add(num)
    else:
      for i in range(2,int(num**0.5)+1):
        if num % i == 0:
          if i in used:
            ok = 0
          else:
            used.add(i)
          x = num//i
          if x in used:
            ok = 0
          else:
            used.add(x)
            
    if ok==0:
      break
      
  if ok==1:
    print('pairwise coprime')
  else:
    print('setwise coprime')