from collections import defaultdict

def prime_factors(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i == 0:
            while temp%i == 0:
                temp //= i
            arr.append(i)

    if temp != 1:
        arr.append(temp)

    return arr

N = int(input())
A = list(map(int, input().split()))

nums = defaultdict(int)

for a in A:
    for x in prime_factors(a):
        nums[x] += 1

y = max(nums.values())

if y < 2:
    print('pairwise coprime')
elif y < N:
    print('setwise coprime')
else:
    print('not coprime')