import itertools
import math


def resolve():
    n = int(input())
    A = list(map(int, input().split()))
    B = itertools.combinations(A, 2)
    C = list(map(lambda x: math.gcd(x[0], x[1]), B))

    if len(list(set(C))) == 1 and list(set(C))[0] == 1:
        print("pairwise coprime")
    elif len(list(set(C))) != 1:
        print("setwise coprime")
    elif len(list(set(C))) == 1:
        print("not coprime")

resolve()