#!/usr/bin/env python3
import sys
from collections import defaultdict

input = sys.stdin.readline


def ST():
    return input().rstrip()


def I():
    return int(input())


def MI():
    return map(int, input().split())


def LI():
    return list(MI())


N = I()
A = LI()


def pre_fac(n):
    D = [0] * (n + 1)
    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
            if not D[j]:
                D[j] = i
    return D


def fac(prime, n):

    if n == 1:
        return [[1, 1]]
    arr, temp = [], n

    while prime[temp]:
        mod = prime[temp]
        cnt = 0
        while temp % mod == 0:
            cnt += 1
            temp //= mod
        arr.append([mod, cnt])

    if temp != 1:
        arr.append([temp, 1])

    return arr


prime = pre_fac(N)

d = defaultdict(int)
for i, a in enumerate(A):
    tmp = fac(prime, a)
    for t in tmp:
        d[t[0]] += 1

flag = True
for v in d.values():
    if flag and v != 1:
        flag = False
    if v == N:
        print("not coprime")
        exit()


if flag:
    print("pairwise coprime")
elif 1 in A:
    print("not coprime")
else:
    print("setwise coprime")
