from math import gcd

N = int(input())
A_list = [int(_) for _ in input().split()]

is_pairwise = True
is_setwise = False

for i in range(len(A_list)):
    if i < N:
        for j in range(i+1, N):
            if gcd(A_list[i], A_list[j]) != 1:
                is_pairwise = False
                break
    if not is_pairwise:
        break

if is_pairwise:
    print('pairwise coprime')
else:
    ans = A_list[0]
    for i in range(1, N):
        ans = gcd(ans, A_list[i])
        if ans == 1:
            is_setwise = True
            break
    if is_setwise:
        print('setwise coprime')
    else:
        print('not coprime')


