n=int(input()) 
c=list(map(int, input().split()))
ans = 1

import math
from functools import reduce
import fractions
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
Prime = []

def func(n):
    while n % 2 == 0:
        n = n // 2
        Prime.append(2)
    for i in range(3, int(math.sqrt(n)) + 1, 2):
        while n % i == 0:
            n = n //i
            Prime.append(i)
    if n > 2:
        Prime.append(n)

for i in range(n):
    if c[i] in Prime:
        ans = 2
        break
    func(c[i])

Ans = gcd_list(c)
 
if ans == 1:
    print('pairwise coprime')
if ans > Ans and Ans == 1:
    print('setwise coprime')
if Ans > 1:
    print('not coprime')