from math import gcd

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

pair = True
for j in range(1, n):
    for i in range(j):
        if gcd(A[i], A[j]) != 1:
            pair = False
            break
    if pair == False:
        break
if pair:
    print('pairwize coprime')
    exit()

a = 1
for i in range(n):
    a = gcd(a, A[i])
    if a != 1:
        print('not coprime')
        exit()
print('setwise coprime')