#coding: utf-8

N = int(input())
A = [int(x) for x in input().split()]

maxA = max(A)
primes = [2]
for i in range(2, maxA):
    if all(i % p != 0 for p in primes):
        primes.append(i)

maxNumDiv = 0
for p in primes:
    numDiv = sum(1 for a in A if a % p == 0) 
    maxNumDiv = max(numDiv, maxNumDiv)

if maxNumDiv == 1:
    print("pairwise coprime")
elif maxNumDiv == N:
    print("not coprime")
else:
    print("setwise coprime")

