def main():
    import sys
    input = sys.stdin.buffer.readline
    from math import gcd
    N = int(input())
    A = list(map(int, input().split()))
    g = A[0]

    # import numpy as np

    # def seachPrimeNum(N):
    #     max = int(np.sqrt(N))
    #     seachList = [i for i in range(2, N+1)]
    #     primeNum = []
    #     while seachList[0] <= max:
    #         primeNum.append(seachList[0])
    #         tmp = seachList[0]
    #         seachList = [i for i in seachList if i % tmp != 0]
    #     primeNum.extend(seachList)
    #     return primeNum

    def factorization(n):
        ret = set()
        temp = n
        for i in range(2, int(-(-n**0.5//1))+1):
            if temp % i == 0:
                cnt = 0
                while temp % i == 0:
                    cnt += 1
                    temp //= i
                ret.add(i)
        if temp != 1:
            ret.add(temp)

        if len(ret) == 0 and n != 1:
            ret.add(n)

        return ret

    # primes = set(seachPrimeNum(max(A)))

    s = factorization(A[0])

    ls = len(s)
    flag = True
    for x in A[1:]:
        g = gcd(g, x)
        if flag:
            for y in s:
                if x % y == 0:
                    flag = False
            s != factorization(x)

    if flag:
        print("pairwise coprime")
    elif g == 1:
        print("setwise coprime")

    else:
        print("not coprime")


main()
