import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter
# a.sort(key=itemgetter(i)) # i番目要素でsort
from functools import lru_cache
import copy
# @lru_cache(maxsize=None)
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7


def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


def str_inp():
    '''
    文字列をリストとして読み込む
    '''
    return list(input()[:-1])


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 = inp()
a = inpl()

data = get_sieve_of_eratosthenes(10**6)
tmp = a[0]
for i in range(1, n):
    tmp = math.gcd(tmp, a[i])
    if tmp == 1:
        break
if tmp != 1:
    print("not coprime")
    exit()

dp = {i: 0 for i in data}
for i in range(n):
    tmp = a[i]
    for j in data:
        if tmp == 1:
            break
        if tmp % j == 0:
            dp[j] += 1
            while tmp % j == 0:
                tmp //= j
ans = max(list(dp.values()))
if ans == 1:
    print("pairwise coprime")
else:
    print("setwise coprime")
# ans = "pairwise coprime"
# for i in data:
#     coprime = 0
#     for j in range(n):
#         if a[j] % i == 0:
#             coprime += 1
#         elif a[j] % i != 0 and (coprime >= 2 or ans == "setwise coprime"):
#             break
#     if coprime == n:
#         ans = "not coprime"
#         break
#     elif coprime >= 2:
#         ans = "setwise coprime"
# print(ans)
