from functools import reduce
from math import gcd


def primes(n):
    is_prime = [i % 2 != 0 and i % 3 != 0 and i % 5 != 0 and i % 7 != 0 for i in range(n + 1)]
    is_prime[1] = False
    is_prime[2] = is_prime[3] = is_prime[5] = is_prime[7] = True
    for p in range(3, int(n**0.5) + 1, 2):
        if not is_prime[p]:
            continue
        for i in range(p**2, n + 1, p):
            is_prime[i] = False
    return [i for i, p in enumerate(is_prime) if p]


def main():
    n = int(input())
    a = [int(i) for i in input().split()]
    if reduce(gcd, a) > 1:
        print("not coprime")
        return
    p = primes(max(max(a), 10))
    for pi in p:
        c = 0
        for ai in a:
            if c > 1:
                print("setwise coprime")
                return
            c += ai % pi == 0
    print("pairwise coprime")


if __name__ == '__main__':
    main()
