conf = False
 
#n以下の素数列挙(O(n log(n))
def primes(n):
    ass = []
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    for i in range(len(is_prime)):
        if is_prime[i]:
            ass.append(i)
    return ass

p = primes(1000)

def test_prime(m, check_list):
    global conf
    for i in p:
        if m % i == 0:
            if check_list[i] >= 1:
                conf = True
            check_list[i] += 1
    return check_list
 
def main():
    N = int(input())
    A = list(map(int, input().split()))
    check_list = [0]*(max(A))
    for i in range(len(A)):
        check_list = test_prime(A[i], check_list)
    if max(check_list) == len(A):
        return "not coprime"
    else:
        if conf:
            return "setwise coprime"
        else:
            return "pairwise coprime"
 
if __name__ == '__main__':
    print(main())