def main():
    from math import gcd
    n, *a = map(int, open(0).read().split())
    m = max(a)

    c = [0] * (m + 1)
    g = a[0]
    for i in a:
        g = gcd(g, i)
        c[i] = 1

    if g > 1:
        pre = "not"
    else:
        for i in range(2, 10 ** 6 + 1):
            if sum(c[i::i]) > 1:
                pre = "setwise"
                break
        else:
            pre = "pairwise"

    print(pre + " coprime")


if __name__ == '__main__':
    main()
