import math
from functools import reduce
def gcbd_list(numbers):
    return reduce(math.gcd, numbers)
N = int(input())
A = list(map(int, input().split()))
P = [False] * (10**6 + 1)
c = True
for i in range(N):
    if P[A[i]] == True:
        c = False
    P[A[i]] = True
    for j in range(2, math.floor(A[i]**0.5)+1):
        if A[i] % j == 0:
            if P[j] == True:
                c = False
            P[j] = True
if c == True:
    print('pairwise coprime')
    exit()
if gcbd_list(A) == 1:
    print('setwise coprime')
    exit()
print('not coprime')
