def max(a,b):
    if a>b:
        return a
    else:
        return b
 
def min(a,b):
    if a>b:
        return b
    else:
        return a
 
def gcd(a,b):
    a,b = max(a,b),min(a,b)
    while a%b!=0:
        a,b = b,a%b
    return b
 
 
def gcdl(A):
    if len(A)==2:
        return gcd(A[0],A[1])
    elif len(A)==1:
        return A[0]
    else:
        return gcd(gcdl(A[:len(A)//2]),gcdl(A[len(A)//2:]))


def sieve_of_eratosthenes(n):
    pl = [i for i in range(2, n + 1)]
    i=0
    D = [0]*(n+1)
    p = pl[0]
    while p**2<=n:
        pl1 = []
        for j in range(len(pl)):
            if pl[j]%p!=0 or j<=i:
                pl1.append(pl[j])
            else:
                D[pl[j]] = p
        pl = pl1
        i+=1
        p=pl[i]
    for p in pl:
        D[p] = p
    return D

import sys

sys.setrecursionlimit(500000)
def input():
    return sys.stdin.readline()[:-1]

def main():
    D = sieve_of_eratosthenes(1000000)

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

    F = set([])
    flag = True
    for a in A:
        b = a
        fact = set([])
        while b>1:
            fact.add(D[b])
            b//=D[b]
        if len(F & fact)>0:
            flag=False
            break
        F = F | fact

    if flag:
        print("pairwise coprime")
    else:
        if gcdl(A)==1:
            print("setwise coprime")
        else:
            print("not coprime")

if __name__ == '__main__':
    main()

