n = int(input())
a = list(map(int,input().split()))
l = [0 for _ in range(10**6+2)]

import itertools
prime_list = []
def eratosthenes_sieve(n):
    table = [0] * (n + 1)
    
    for i in range(2, n + 1):
        if table[i] == 0:
            prime_list.append(i)
            for j in range(i + i, n + 1, i):
                table[j] = 1
    
    return prime_list
    
eratosthenes_sieve(10**6+2)

def fac(n):
    temp = n
    for i in prime_list:
        if temp>= i:
            if temp%i==0:
                cnt=0
                while temp%i==0:
                    cnt+=1
                    temp //= i
                l[i] += 1
        else:
            break
    if temp!=1:
        l[temp] += 1

for i in range(n):
    fac(a[i])
bit = 0
for i in l:
    if i==n:
        print("not coprime")
        exit()
    if i!=0 and i!=1:
        bit =1 

if bit==1:
    print("setwise coprime")
else:
    print("pairwise coprime")
