#ここまでテンプレ
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

n = int(stdin.readline().rstrip())
a = list(map(int,stdin.readline().rstrip().split()))

import math

ans = a[0]
sosu = a[0]

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return set(a)

an = prime_factorize(a[0])
flag = True

for i in range(1, n):
    ans = math.gcd(ans, a[i])
    pri = prime_factorize(a[i])
    for j in pri:
        if j in an:
            flag = False
    
if ans == 1 and flag == True:
    print("pairwise coprime")
elif ans == 1:
    print("setwise coprime")
else:
    print("not coprime")