import math

def main():
    N = int(input())
    A = list(map(int, input().split()))
    A = list(set(A))
    cnt = 0
    allgcd = A[0]
    for a in A:
        allgcd = math.gcd(allgcd, a)
        if a % 2 == 0:
            cnt += 1
    if allgcd != 1:
        return "not coprime"
    
    if cnt >= 2:
        return "setwise coprime"

    allprime = set()
    for a in A:
        N = a
        prime, i = set(), 1
        while i * i <= N:
            if N % i == 0:
                prime.add(i)
                prime.add(N//i)
                if i in allprime or (N//i) in allprime:
                    return "setwise coprime"
                if i > 1:
                    allprime.add(i)
                allprime.add(N//i)
            i += 1
    return "pairwise coprime"

print(main())
