from collections import Counter
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()
    Max = a_ls[-1]
    c = Counter(a_ls)

    res = 'pairwise coprime'
    
    lim = int(Max**0.5)+2
    isdone = [0] * (Max+1)
    # baseは共通の素因数の候補
    for base in range(2,lim+1):
        if base > Max:
            break
        if isdone[base]:
            continue

        now = base
        time_inA = 0
        while now <= Max:
            isdone[now] = 1
            if c[now] > 0:
                time_inA += c[now]
            now += base
            
        if time_inA >= 2:
            res = 'setwise coprime'
            break
            
    print(res)