def make_divisors(n):
    divisors = []
    # 試し割りで、かつ積でnを作るときの相方も同時に追加してる
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors
from math import gcd
import sys
n = int(input())
a_ls = list(map(int, input().split()))
now = a_ls[0]
for i in range(1,n):
    now = gcd(now,a_ls[i])
if now != 1:
    print('not coprime')
    sys.exit()
else:
    a_ls.sort()
    is_in_a = [0] * (10**6+1)
    for a in a_ls:
        is_in_a[a] = 1

    res = 'pairwise coprime'
    
    for i in range(n):
        divisors = make_divisors(a_ls[i])
        for d in divisors:
            if d == 1:
                continue
            base = d
            now = 2*base
            while now <= int((10**6)**0.5)+1:
                if is_in_a[now] and not now == a_ls[i]:
                    res = 'setwise coprime'
                    break
                now += base

    print(res)