def g(a,b):
	if(b==0):
		return a
	else:
  		return g(b,a%b)

def gcdarr(arr):
	ans=arr[0]
	for val in arr:
  		ans=g(ans,val)
	return ans  

def lcm(a,b): 
	return (a*b) / g(a,b)

def lcmarr(arr):
	ans=arr[0]
	for val in arr:
  		ans=lcm(ans,val)
	return ans  
  
n=int(input())
arr=list(map(int,input().split()))       

prod=1         
for i in range(n):        
	prod=prod*arr[i]

#print(prod,lcmarr(arr))
if prod == lcmarr(arr):
    print("pairwise coprime")

elif gcdarr(arr)== 1:
    print("setwise coprime")
else:
    print("not coprime")
         
             
