import itertools
import math


def resolve():
    n = int(input())
    A = list(map(int, input().split()))
    B = itertools.combinations(A, 2)
    new_arr = []
    for b in B:
        c = math.gcd(b[0], b[1])
        if c != 1:
            new_arr.append(c)

    if len(new_arr) == 0:
        print("pairwise coprime")
    elif len(list(set(new_arr))) != 1:
        print("setwise coprime")
    else:
        print("not coprime")

resolve()