def main():
    from functools import reduce
    n, *a, = map(int, open(0).read().split())
    a = list(set(a))
    m = max(a)

    d = [0] * (m + 1)
    d[1] = 1
    for i in range(2, m + 1):
        for j in range(i, m + 1, i):
            if d[j] == 0:
                d[j] = i

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

    b = []
    for i in a:
        ps = primes(i)
        b.append(ps)

    ca = set()
    cb = b[0]
    f = 0
    for ci in b:
        if ca & ci:
            f = 1
        ca |= ci
        cb &= ci
    else:
        if f == 1 and len(cb) > 0:
            f = 2

    ans = ["pairwise coprime", "setwise coprime", "not coprime"][f]
    print(ans)


if __name__ == '__main__':
    main()
