def resolve():
    import math
    from collections import defaultdict
    n = int(input())
    a = list(set(map(int, input().split())))

    maxa = max(a)
    e = [0]*(maxa+1)
    for i in range(2, maxa+1):
        for j in range(i, maxa+1, i):
            if e[j] == 0:
                e[j] = i

    ggcd = a[0]
    for i in range(1, len(a)):
        ggcd = math.gcd(ggcd, a[i])
        if ggcd == 1:
            break

    pair = False
    divisors = set([])
    for i in range(0, len(a)):
        test = a[i]
        divs = []
        while test > 1:
            divs.append(e[test])
            test //= e[test]
        divs = set(divs)
        if divs & divisors != set():
            pair = True
            break
        else:
            divisors = divs|divisors

    if ggcd != 1:
        print("not coprime")
    else:
        if pair:
            print("setwise coprime")
        else:
            print("pairwise coprime")

resolve()