def  gcd( a,  b): 
    while a != 0: 
        a, b = b % a, a
    return b
N = int(input())
A = [int(s) for s in input().split()]

def is_pw(N, A):
    prod = 1
    for a in A:
        if gcd(a, prod) == 1:
            prod *= a
        else:
            return False
    return True

def is_sw(N,A):
    n = A[0]
    for a in A:
        n = gcd(a, n) 
        if n == 1:
            return True
    return False

def main(N, A):
    if N < 20000:
        if is_pw(N, A):
            print('pairwise coprime')
            return

    if is_sw(N, A):
        print('setwise coprime')
        return 
    print('not coprime')
main(N, A)