def primes(x):
    p = set()
    for i in range(2, x + 1):
        if x == 1:
            break
        if x % i != 0:
            continue
        while x % i == 0:
            x = x // i
        else:
            p.add(i)

    return p


def main():
    n, *a, = map(int, open(0).read().split())
    b = set()
    c = primes(a[0])
    f = True
    for i in a:
        p = primes(i)
        if f:
            if b & p:
                f = False
            b = b.union(p)
        c = c & p

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

    print(ans)


if __name__ == '__main__':
    main()
