from math import sqrt, gcd
import sys


def osk_a(M):
    p = [i for i in range(M+1)]
    for x in range(2, int(sqrt(M))+1):
        if p[x] == x:
            for y in range(2*x, M+1, x):
                if p[y] == y:
                    p[y] = x
    return p


def main():
    n = int(sys.stdin.buffer.readline())
    a = list(map(int, sys.stdin.buffer.readline().split()))
    g = 0
    for x in a:
        g = gcd(g, x)
    if g > 1:
        print("not coprime")
        exit()
    p = osk_a(10**6)
    a = [p[x] for x in a]
    chk = len(set(a))
    if chk == n:
        print("pairwise coprime")
    else:
        print("setwise coprime")


if __name__ == "__main__":
    main()
