def prime(n):
    nums = [True]*n
    primes = []
    for i in range(2,n):
        if nums[i]:
            primes.append(i)
            for j in range(2*i,n,i):
                nums[j] = False
    return primes

def main():
    n = int(input())
    A = set(map(int,input().split()))
    Amax = max(A)

    primes = set(prime(Amax+1))
    ct = 0
    for p in primes:
        g = set(())
        temp = p
        while temp <= Amax:
            g.add(temp)
            temp+=p
        
        k = len(g & A)
        if k > ct:
            ct = k
    
    if ct == n:
        print("not coprime")
    elif ct == 1:
        print("pairwise coprime")
    else:
        print("setwise coprime")
main()