import math
def main():

    N = int(input())
    A = list(map(int, input().split()))


    def isprime(a):
        if a == 1: return False
        for i in range(2, int(math.sqrt(a))+1):
            if a % i == 0: return False
        return True

    primes = []
    for v in range(1, int(math.sqrt(max(A)))+1):
        if isprime(v):  primes.append(v)

    # for v in range(1, pow(10, 6)+1):
    #     if isprime(v):  primes.append(v)

    # print(primes)

    d = dict()
    ispair = True
    isset = True
    for v in A:
        for p in primes:
            if v % p == 0:
                d[p] = d.get(p, 0) + 1
    if any(d[p] > 1 for p in d):
        ispair = False
    if any(d[p] == N for p in d):
        isset = False

    if ispair:
        return "pairwise coprime"
    if isset:
        return "setwise coprime"
    return "not coprime"

if __name__ == '__main__':
    print(main())