def resolve():
    import math
    from collections import defaultdict
    def factorization(n):
        # 参考: https://qiita.com/snow67675476/items/e87ddb9285e27ea555f8
        dic = defaultdict(int)
        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
                dic[i] = cnt

        if temp != 1:
            dic[temp] = 1
        if not dic:
            dic[n] = 1

        return set(dic.keys())

    n = int(input())
    a = list(set(map(int, input().split())))
    pair = False
    divisors = factorization(a[0])
    ggcd = a[0]
    for i in range(1, len(a)):
        divs = factorization(a[i])
        nxt = divisors | divs
        if len(nxt) != len(divs) + len(divisors):
            pair = True
            break
        else:
            divisors = nxt
    for i in range(1, len(a)):
        ggcd = math.gcd(ggcd, a[i])
        if ggcd == 1:
            break
    if ggcd != 1:
        print("not coprime")
    else:
        if pair:
            print("setwise coprime")
        else:
            print("pairwise coprime")
resolve()