def main():
    n, *a, = map(int, open(0).read().split())
    m = max(a)

    def minimum_prime(x):
        if x == 1:
            return 1
        for i in range(2, x + 1):
            if x % i == 0:
                return i

    d = [minimum_prime(i) for i in range(m + 1)]

    def primes(x):
        ps = set()
        while x != 1:
            p = d[x]
            ps.add(p)
            x = x // d[x]
        return ps

    b = set()
    c = primes(a[0])
    f = 0
    for i in a:
        primes = set()
        while i != 1:
            p = d[i]
            primes.add(p)
            i = i // d[i]
        if b & primes:
            f = 1
        b |= primes
        c &= primes

    if f == 0:
        ans = "pairwise coprime"
    elif len(c) == 0:
        ans = "setwise coprime"
    else:
        ans = "not coprime"

    print(ans)


if __name__ == '__main__':
    main()
