import math

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 = []
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]

n = int(input())
a = list(map(int,input().split()))
maxval = max(a)
p = get_sieve_of_eratosthenes(maxval)
d = [-1]*1000010
m = [-1]*1000010
flag = True


for i in p[::-1]:
  tmp = i
  multi = 2
  while(tmp<=maxval):
    d[tmp] = i
    tmp = tmp*multi
    multi += 1
    
for i in a:
  while(d[i]!=i):
    if(m[d[i]]==1):
      flag = False
      break
    m[d[i]] = 1
    i = i // d[i]
  m[d[i]] = 1
  if(flag == False):
    break
  
if(flag):
  print("pairwise coprime")
else:
  ans = a[0]
  for i in range(1, n):
    ans = math.gcd(ans, a[i])
  if ans==1:
    print("setwise coprime")
  else:
    print("not coprime")