n = int(input())
A = list(map(int, input().split()))
min_A = min(A)
one_num = 0

from sys import exit
if min_A == 1:
    one_num = A.count(1)
    A = [num for num in A if num != 1]

from collections import Counter
prime_list = []
for num in range(2, 10**3 + 1):
    for prime in prime_list:
        if num % prime == 0:
            break
    else:
        prime_list.append(num)
#print(prime_list)


cnt = Counter()
set_primes = set(prime_list)
for a in A:
    soinsu = []
    flg = True
    for prime in prime_list:
        if prime ** 2 > a:
            break
        if a % prime == 0:
            flg = False
            cnt[prime] += 1
            if a // prime in set_primes:
                cnt[a // prime] += 1
    if flg:
        cnt[a] += 1
"""
    for num in list(set(soinsu)):
        cnt[num] += 1
#print(cnt)
"""

if len(cnt) == 0:
    print("pairwise coprime")
    exit()

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