large = 10**6+1
furui = [True]*(large)
prime_num = []
for num in range(large):
    if num in (0,1):
        furui[num] = False
    else:
        if furui[num]:
            times = 1
            while num * times < large:
                
                if times == 1:
                    prime_num.append(num)
                else:
                    furui[num*times] = False
                times += 1
N = int(input())
ls = list(map(int, input().split()))
num_divided = [0]*len(prime_num)
for element in ls:
    for num in range(len(prime_num)):
        diviser = prime_num[num]
        if diviser > element:
            break
        else:
            if element % diviser == 0:
                num_divided[num] += 1

if max(num_divided) <= 1:
    print("pairwise coprime")
elif max(num_divided) < N:
    print("setwise coprime")
else:
    print("neither")
