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

def primes(n):
    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
    return [i for i in range(n + 1) if is_prime[i]]

pl = primes(1000)

def fact(n):
    arr = []
    temp = n
    for i in pl:
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

import math

temp = []
dp = [0]*(10**6)
#pairwise
for i in range(n):
    for j in fact(al[i]):
        dp[j[0]] +=1

if max(dp)==1:
    print("pairwise coprime")

elif max(dp) ==n:
    print("not coprime")
    
else:
    print("setwise coprime")