import math
import collections
def main():

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

    d = dict()
    def prime_factor(n):
        if n % 2 == 0: d[2] = d.get(2, 0) + 1
        while n % 2 == 0:
            n //= 2

        for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                d[i] = d.get(i, 0) + 1
            while n % i == 0:
                n //= i
        if n > 1:
            d[n] = d.get(n, 0) + 1
        return

    ispair = True
    isset = True

    d = dict()
    for v in A: prime_factor(v)
    # print(d)

    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())