n = int(input())
a = list(map(int, input().split()))
def gcd(ls):
    smallest = min(ls)
    for divider in range(smallest, 0, -1):
        count = 0
        for number in a:
            if number % divider == 0:
                count += 1
        if count == len(ls):
            return divider
            break
def couple(f, s):
    love = 1
    if f >= s:
        min = s
    else:
        min = f
    for divider in range(1, min):
        if s % divider == 0 and f % divider == 0:
            if divider > love:
                love = divider
    return love
if gcd(a) == 1:
    count = 0
    for number in range(n):
        for pair in range(0, number):
            if couple(a[number], a[pair]) == 1:
                count += 1
    if count == n*(n-1)/2:
        print("pairwise coprime")
    else:
        print("setwise coprime")
else:
    print("not coprime")