# import numpy as np
import sys, math, heapq
from functools import reduce
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial, gcd
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep="\n")

N = int(input())
A = list(map(int, input().split()))


def era(N):
    A = list(range(2, N + 1))
    p = list()
    while A[0] ** 2 <= N:
        tmp = A[0]
        p.append(tmp)
        A = [e for e in A if e % tmp != 0]
    return p + A


plist = era(max(A))


def fctr1(n):
    f = []
    c = 0
    r = int(n ** 0.5)
    # for i in range(2, r + 2):
    for i in plist:
        if i >= r + 2:
            break
        while n % i == 0:
            c += 1
            n = n // i
        if c != 0:
            f.append([i, c])
            c = 0
    if n != 1:
        f.append([n, 1])
    return f


fctA = [fctr1(a) for a in A]
pfactors = defaultdict(int)
is_pc = True
for fcta in fctA:
    if not (is_pc):
        break
    for p in fcta:
        pn = p[0]
        if pfactors[pn] > 0:
            is_pc = False
            break
        else:
            pfactors[pn] += 1
if is_pc:
    print("pairwise coprime")
else:
    is_sc = reduce(gcd, A) == 1
    if is_sc:
        print("setwise coprime")
    else:
        print("not coprime")
