import math

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

soinsuu = []

def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    prime = [2]
    limit = int(n**0.5)
    data = [i + 1 for i in range(1, n)]
    super_erasuto = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return super_erasuto
        prime.append(p)
        super_erasuto =  [p if e % p == 0 else e for e in super_erasuto]
        data = [e for e in data if e % p != 0]

data = get_sieve_of_eratosthenes(max(a))
data.insert(0, 1)
data.insert(0, 0)

for i in a:
  soinsuu.append(data[i])

if len(set(soinsuu)) == len(soinsuu):
  ans = "pairwise coprime "
else:
  ans = "setwise coprime"  
  
  gcd = a[n-1]
  for i in range(len(a)-1):
    gcd = math.gcd(a[i],gcd)
  if gcd != 1:
    ans = "not coprime"
  
print(ans)