def gen_prime(n) :
    arr = [True] * (n+1)
    arr[0] = False
    arr[1] = False

    for i in range(len(arr)) :
        if i**2 >= n :
            break

        if arr[i] :
            idx = i*2
            while idx <= n :
                arr[idx] = False
                idx += i

    return [p for p in range(len(arr)) if arr[p]]

def solve() :
    n = int(input())
    a = list(map(int, input().split()))

    p_list = gen_prime(10**3)
    p_cnt = [0] * len(p_list)

    for i in range(len(a)) :
        for j in range(len(p_list)) :
            if a[i] < p_list[j] :
                break

            if a[i] % p_list[j] == 0 :
                p_cnt[j] += 1

    if max(p_cnt) == n :
        print("not coprime")
    
    elif 2 <= max(p_cnt) < n :
        print("setwise coprime")

    else :
        print("pairwise coprime")

if __name__ == "__main__":
    solve()