# coding: utf-8
# Your code here!
import math

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


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

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

mimm = 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 =  math.gcd(mimm,a)
        if mimm  == 1:
            flag ='setwise coprime'
            break
        
print(flag)