#coding: utf-8

from collections import defaultdict
from functools import reduce
from math import gcd
import sys

N = int(input())
maxA = 0
A = []
for a in (int(x) for x in input().split()):
    if a > maxA:
        maxA = a
    A.append(a)

D = [0] * (maxA + 1)
i = 2
primes = [2]
for i in range(2, maxA+1):
    for p in primes:
        if p * p > i:
            break
        if i % p == 0:
            D[i] = p
            break
    if D[i] == 0:
        primes.append(i)
        D[i] = i

def primeFac(N):
    ret = set()
    i = 2
    while N >= 2:
        ret.add(D[N])
        N //= D[N]
    return ret

numDiv = defaultdict(int) 
for a in A:
    for f in primeFac(a):
        numDiv[f] += 1
if max(numDiv.values()) == 1:
    print("pairwise coprime")
else:
    if (reduce(gcd, A) == 1):
        print("setwise coprime")
    else:
        print("not coprime")
