from math import gcd, sqrt, cos, radians, pi, factorial as f
from collections import defaultdict as d

n = int(input())
arr = list(map(int, input().split()))

primes = d(int)

for i in arr:
	
	if i % 2 == 0:
		primes[2] += 1
		while i % 2 == 0:
			i //= 2
	for j in range(3, int(sqrt(i))+1, 2):
		if i % j == 0:
			primes[j] += 1
			while i % j == 0:
				i //= j
	if i > 1:
		primes[i] += 1

count = 0
no = 0	
for i in primes.keys():
	if primes[i] == 1:
		count += 1
	if primes[i] == n:
		no = 1
		
if count == n:
	print("pairwise coprime")
elif not no:
	print("setwise coprime")
else:
	print("not coprime")