import itertools
import collections
def prime_factor_table(n):
    table = [0] * (n + 1)
    
    for i in range(2, n + 1):
        if table[i] == 0:
            for j in range(i + i, n + 1, i):
                table[j] = i
    
    return table

def prime_factor(n, prime_factor_table):
    prime_count = dict()
    
    while prime_factor_table[n] != 0:
        prime_count[prime_factor_table[n]] = 1
        n //= prime_factor_table[n]
    prime_count[n] = 1
    
    return prime_count

pp = prime_factor_table(10**6)
#n = 18
#y = prime_factor(n, pp)
#print(y)
N, = map(int, input().split())
X = list(map(int, input().split()))
d = dict()
f = 0
for x in X:
    y = prime_factor(x, pp)
#    print(y)
    for k in y:
        if k in d:
            f = 1
            d[k] += 1
        else:
            d[k] = 1
#            continue
#        d.add(k)
#    if f:
#        break
if f:
    m = 0
#    print(d)
    for k in d:
        m = max(m, d[k])
    if m != N:
        print("setwise coprime")
    else:
        print("not coprime")
else:
    print("pairwise coprime")
