from functools import reduce
from math import gcd 

n = int(input())
A = list(map(int, input().split()))
pr = [True]*(10**6+5)

def prime_fact(x):
    memo = [0]*(x+1)
    primes = []
    if x <= 1: return False
    for i in range(2, x+1):
        if memo[i]:
            continue
        primes.append(i)
        memo[i] = i
        for j in range(i*i, x+1, i):
            if memo[j]:
                continue
            memo[j] = i
    a = x
    b = []
    while a > 1:
        b.append(memo[a])
        a //= memo[a]
    return b


for a in A:
    if a == 1: continue
    for p in set(prime_fact(a)):
        if not pr[p]:
            break
        pr[p] = False
    else:
        continue
    break
else:
    print('pairwise coprime')
    exit()

if reduce(gcd, A) == 1:
    print('setwise coprime')
else:
    print('not coprime')