import math
from functools import reduce

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

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

def prime_factorize(n):#リスト
    a = []
    while n % 2 == 0: # 2で割れるだけ割る
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n: # fで割れるだけ割る
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1: #　残った絞りかすの素数を追加
        a.append(n)
    return a

ch = gcd_list(a)
if ch != 1:
    print("not coprime")
else:
    check = 0
    s = a[0]
    lis = list(set(prime_factorize(a[0])))
    for i in range(1, n):
        x = list(set(prime_factorize(a[i])))
        nx = len(x)
        new = x + lis
        nnew = len(set(new))
        if nnew != len(lis) + nx:
            check += 1
            break
        else:
            lis = new
    if check == 0:
        print("pairwise coprime")
    else:
        print("setwise coprime")