import  math

n = int(input())
A = list(map(int, input().split()))
ans = A[0]
flag = 0

for i in range(1, n):
    ans = math.gcd(ans, A[i])
    if ans != 1:
        flag = 1

if ans == 1 and flag == 0:
    print('pairwise coprime')
elif ans == 1:
    print('setwise coprime')
else:
    print('not coprime')
