from collections import defaultdict
import sys
input = sys.stdin.readline


def factorization(n):
    arr = []
    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
            arr.append(i)

    if temp != 1:
        arr.append(temp)

    return arr


def main():
    n = int(input())
    A = list(map(int, input().split()))
    fact_dict = defaultdict(int)
    for a in A:
        facts = factorization(a)
        for fact in facts:
            fact_dict[fact] += 1

    count = max(fact_dict.values())
    if count == 1:
        print("pairwise coprime")
    elif count != n:
        print("setwise coprime")
    else:
        print("not coprime")


if __name__ == "__main__":
    main()
