N = int(input())

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

max_a = max(A)

set_a = set(A)

setFlag = False

if len(set_a) != len(A):
    setFlag = True

for i in range(2,int(max_a**0.5)+2):
    tmp_count = 0
    pairFlag = True
    for key,a in enumerate(set_a):
        if a%i == 0:
            tmp_count += 1
            if 1 == tmp_count or tmp_count == key+1:
                continue
            else:
                setFlag = True
                break
        else:
            pairFlag = False
    if pairFlag:
        print('not coprime')
        exit()

if setFlag:
    print('setwise coprime')
else:
    print('pairwise coprime')