def main():
    N = int(input())
    A_list = list(map(int, input().split()))

    maxa = max(A_list)
    lim = maxa

    primes_table = [True] * lim
    primes_table[0] = primes_table[1] = False
    primes = set()
    for i in range(2,lim):
        if primes_table[i] == False:
            continue
        primes.add(i)
        for j in range(i+i, lim, i):
            primes_table[j] = False

    a_set = [set()] * N
    pr_dict = {r: set() for r in primes}
    for a in A_list:
        for p in primes:
            if a%p== 0:
                pr_dict[p].add(a) 
                
    maxlen = 0
    for d in pr_dict.values():
        maxlen=max(maxlen, len(d))

    if maxlen == 1:
        print("pairwise coprime")
    elif maxlen < N:
        print("setwise coprime")
    else:
        print("not coprime")
if __name__ == "__main__":
    main()
