from math import gcd
n = int(input())
a = list(map(int, input().split()))

pairwise = True
for i in range(n - 1):
    for j in range(i + 1, n):
        if gcd(a[i], a[j]) != 1:
            pairwise = False
            break
if pairwise:
    print('pairwise coprime')
    exit()

setwise = gcd(a[0], a[1])
for i in range(2, n):
    setwise = gcd(setwise, a[i])

if setwise == 1:
    print('setwise coprime')
else:
    print('not coprime')
