def factorization(n, is_prime):
    arr = []
    temp = n
    for i in [i for i in range(int(n**0.5)+1) if is_prime[i]]:
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr

def search_prime(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return is_prime
    return [i for i in range(n + 1) if is_prime[i]]  

def main():
  n = int(input())
  arr = list(map(int, input().split()))
  max_arr = max(arr)
  is_prime = search_prime(int(max_arr**0.5//1))
  dp = [0]*(max_arr+1)
  is_pair = True
  is_set = True

  for a in arr:
    primes = factorization(a, is_prime)
    for p in primes:
      dp[p] += 1

  max_dp = max(dp)
  if max_dp == 1:
    print('pairwise coprime')
  elif max_dp == n:
    print('not coprime')
  else:
    print('setwise coprime')
  
main()