# coding: utf-8
# Your code here!
def divisors(n): 
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

def divisor(n,m): 
    i = 1
    table = []
    while i * i <= max(n,m):
        if n%i == 0 & m%i == 0:
            table.append(i)
            table.append(n//i)
            table.append(m//i)
        i += 1
    table = list(set(table))
    return table
  
n = int(input())
ab = list(map(int, input().split()))

fd = set([1])
flag = 'pairwise coprime'

mimm = set(divisors(min(ab)))


for a in ab:
    if fd & set(divisors(a)) != {1}:
        flag = 'setwise coprime'
        break
    fd = fd | set(divisors(a))

if flag ==  'setwise coprime':
    flag = 'not coprime'
    for a in ab:
        mimm =  mimm & set(divisors(a))
        if mimm  == {1}:
            flag ='setwise coprime'
            break
        
print(flag)