from math import sqrt
from math import gcd

def fact(n):
    P = set()
    for i in range(2,int(sqrt(n))+1):
        if n % i == 0:
            P.add(i)
            while n % i != 0:
                n //= i
    if n != 1:
        P.add(n)
    return P

def GCD(A,N):
    g = A[0]
    for i in range(N):
        g = gcd(g,A[i])
        if g == 1:
            return 1
    return g

def solve(A,N):
    ans = ["pairwise coprime","setwise coprime","not coprime"]
    ans_id = 0
    max_A = max(A)
    T = [0 for _ in range(max_A+1)]
    pc_flag = True
    for i in range(N):
        for j in range(1,A[i]):
            if A[i] % j == 0:
                T[A[i]//j] += 1

    for i in range(len(T)):
        if T[i] >= 2:
            pc_flag = False
            ans_id += 1
            break

    if pc_flag:
        return ans[ans_id]
    else:
        if GCD(A,N) == 1:
            return ans[ans_id]
        else:
            ans_id += 1
            return ans[ans_id]

def main():
    N = int(input())
    A = list(map(int,input().split()))

    print(solve(A,N))

if __name__ == "__main__":
    main()
