import sys
from math import gcd
input = sys.stdin.buffer.readline

n = int(input())
a = list(map(int,input().split()))


def primes(n):
    ass = []
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    for i in range(len(is_prime)):
        if is_prime[i]:
            ass.append(i)
    return ass

p = primes(1003)



g = a[0]
for e in a:
    g = gcd(g,e)

if g != 1:
    print("not coprime")
else:
    s = set()
    for e in a:
        if e in s:
            print("setwise coprime")
            exit()
        for d in p:
            if e < d:
                break
            if e%d == 0:
                if d in s:
                    print("setwise coprime")
                    exit()
                s.add(d)
        s.add(e)
    print("pairwise coprime")
