from collections import defaultdict
import sys
import math

input = sys.stdin.readline


# 素因数分解O(√n)

def primeFactor(n):
    res = defaultdict(lambda: 0)
    for i in range(2, int(n**0.5)+1):
        while n % i == 0:
            res[i] += 1
            n = n // i
    if n != 1:
        res[n] = 1
    return res


def main():
    N = int(input())
    A = list(map(int, input().split()))
    primes = defaultdict(lambda: 0)
    for i in range(N):
        pf = primeFactor(A[i])
        for k in pf.keys():
            primes[k] += 1
    if all(primes[k] == 1 for k in primes.keys()):
        print('pairwise coprime')
    elif all(primes[k] < N for k in primes.keys()):
        print('setwise coprime')
    else:
        print('not coprime')


if __name__ == '__main__':
    main()
