def gcd(a,b):
    if a < b:
        a,b = b,a
    a = a%b
    return gcd(b,a) if a!= 0 else b

def prime_list(a):
    for i in range(2,int(a**0.5)+1):
        if a%i == 0:
            yield i

def main():
    n = int(input())
    A = list(map(int,input().split()))
    A = sorted(A)
    prime = [True for i in range(int(1e6+2))]
    setwise = A[0]
    pairwise = True
    for a in A:
        for p in prime_list(a):
            if pairwise and prime[p] == True:
                prime[p] = False
                index = p
                while index < len(prime):
                    prime[index] = False
                    index += p
            else:
                pairwise = False
                break

        setwise = gcd(setwise,a)

    # pairwise = True
    # setwise = A[0]
    # for a in A[1:]:
    #     if pairwise and gcd(A[0],a) != 1:
    #         pairwise = False

    #     setwise = gcd(setwise,a)
    if pairwise:
        print("pairwise coprime")
    elif setwise == 1:
        print("setwise coprime")      
    else:
        print("not coprime")
    return

if __name__ == "__main__":
    main()