from collections import defaultdict
from itertools import combinations
from functools import reduce
from operator import mul
n=int(input())

cnt = defaultdict(int)
A=list(map(int,input().split()))
for n_ in range(n):
    a=A[n_]
    divisors = set()
    for i in range(1, int(a**.5)+1):
        if a % i == 0:
            divisors |= {i, a//i}
    for div in divisors:
        cnt[div] += 1
answer=0
for a in A:
    facts = set()
    for p in range(2, int(-(-a**.5//1))+1):
        while a % p == 0:
            facts.add(p)
            a //= p
    if a != 1:
        facts.add(a)

    ans = n
    for k in range(1, len(facts)+1):
        for subset in combinations(facts, k):
            x = reduce(mul, subset)
            ans += cnt[x]*(-1)**k
    answer+=ans
if answer%n==0 and answer//n==n-1:
    print('pairwise coprime')
else:
    def gcd(a, b):
        if b == 0:
            return a
        else:
            return gcd(b, a % b)


    num = A[0]
    for a in A:
        num = gcd(num, a)
    if num != 1:
        print('not coprime')
    else:
        print('setwise coprime')
        