n = int(input())
A = list(map(int, input().split()))
max_A = max(A)
import math
from collections import Counter
def sieve_of_erastosthenes(num):
    input_list = [False if i % 2 == 0 or i % 3 == 0 or i % 5 == 0 else True for i in range(num)]
    input_list[0] = input_list[1] = False
    input_list[2] = input_list[3] = input_list[5] = True
    sqrt = math.sqrt(num)
    for serial in range(3, num, 2):
        if serial >= sqrt:
            return input_list
        for s in range(serial ** 2, num, serial):
            input_list[s] = False
if max_A >= 8:
    input_list = sieve_of_erastosthenes(max_A + 1)
    prime_list = [i for i, b in enumerate(input_list) if b == True]
else:
    input_list = [2, 3, 5, 7]
    prime_list = [num for num in input_list if num <= max_A]
#print(prime_list)


cnt = Counter()
set_primes = set(prime_list)
for a in A:
    soinsu = []
    for prime in prime_list:
        if prime ** 2 > a:
            break
        if a % prime == 0:
            soinsu.append(prime)
            if a // prime in set_primes:
                soinsu.append(a // prime)
    if a in set_primes:
        soinsu.append(a)

    for num in list(set(soinsu)):
        cnt[num] += 1
#print(cnt)

max_cnt = max(cnt.values())
if max_cnt == 1:
    print("pairwise coprime")
elif max_cnt == n:
    print("not coprime")
else:
    print("setwise coprime")