import math
n = int(input().rstrip())
a = list(map(int,input().rstrip().split()))
pgcd = True
sgcd = a[n-1]

for i in range(0,n-1):
    sgcd = math.gcd(sgcd, a[i])
    for j in range(i+1,n):
        if math.gcd(a[i], a[j]) != 1:
            pgcd = False

if pgcd:
    print('pairwise coprime')
elif sgcd==1:
    print('setwise coprime')
else:
    print('not coprime')