from collections import defaultdict
from numba import njit, b1, i4, i8, f8

@njit(cache = True)
def get_prime_factors(x):
    return [2, 3]

@njit
def main():
    df = {"2":0, "3":0}
    
    
    for ai in a:
        primes = get_prime_factors(ai)
        for prime in primes:
            df[prime] += 1
    if df.values():
        val = max(df.values())
        if val == 1:
            print("pairwise coprime")
        elif val == n:
            print("not coprime")
        else:
            print("setwise coprime")
    else:
        print("pairwise coprime")

n = int(input())
a = list(map(int, input().split()))
main()
