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

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

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

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


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

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