from math import gcd

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

checker = [0 for _i in range(10**6+1)]
h = True
for i in a:
    if i == 1:
        continue
    num = i
    if num%2==0:
        checker[2] += 1
        num //= 2
        if checker[2] >= 2:
            h = False
            break
    
    for j in range(3, int(i**0.5)+1):
        if num%j == 0:
            checker[j] += 1
            if checker[j] >= 2:
                h = False
                break
            num //= j
    if num == i:
        checker[num] += 1
        if checker[num] >= 2:
            h = False
            break
if h == True:
    print('pairwise coprime')
else:
    r = a[0]
    for i in a:
        r = gcd(r, i)
    if r == 1:
        print('setwise coprime')
    else:
        print('not coprime')