import math

def eratosthenes():
    erat = [0 for _ in range(max(a)+1)]
    lim = int(math.sqrt(max(a)))
    for i in range(2, lim+1):
        res = i
        while res <= max(a):
            if erat[res] == 0:
                erat[res] = i
            res += i
    for i in range(max(a)+1):
        if erat[i] == 0:
            erat[i] = i
    return erat        

n = int(input())
a = [int(x) for x in input().split()]

erat = eratosthenes()
cnt = dict()
for i in range(n):
    cnt[erat[a[i]]] = cnt.get(erat[a[i]], 0) + 1

if max(cnt.values()) == 1:
    print('pairwise coprime')
else:
    res = a[0]
    for i in range(1, n):
        res = math.gcd(res, a[i])
    if res == 1:
        print('setwise coprime')
    else:
        print('not coprime')