

def seachPrimes(N):
    max = int(N ** 0.5)
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

def main():
    primes = seachPrimes(10**3)
    n = int(input())
    A = list(map(int, input().split()))


    cnts = []
    for prime in primes:
        cnt = 0
        for a in A:
            if a % prime == 0:
                cnt += 1
        cnts.append(cnt)
    if max(cnts) == n or (min(A) == max(A) and min(A) != 1):
        print("not coprime")
    elif max(cnts) >= 2:
        print("setwise coprime")
    else:
        print("pairwise coprime")

if __name__ == '__main__':
    main()