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

import math
tmp = A[0]

for i in range(1,N):
    gcd = math.gcd(tmp,A[i])
    
if gcd != 1:
    print("not coprime")
    exit()
    
tmp_list = [0]*(max(A)+1)

def make_divisors(n,tmp_list):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            #divisors.append(i)
            tmp_list[i] += 1
            if i != n // i:
                #divisors.append(n//i)
                tmp_list[i] += 1

    #divisors.sort()
    return tmp_list

for i in range(N):
    make_divisors(A[i],tmp_list)

tmp_list
for i in range(2,max(A)+1):
    if tmp_list[i] > 1:
        print("setwise coprime")
        exit()
        
print("pairwise coprime")