'''بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ'''
#codeforces
from math import gcd
from functools import reduce
gi = lambda : list(map(int,input().split()))
def lcm(x, y):
	return (x * y) * gcd(x, y);
n, = gi()
a = gi()
lcmm = reduce(lcm, a);
prod = 1
for e in a:
	prod *= e
	if e > lcmm:
		break;
if prod == lcmm:
	print("pairwise coprime")
	exit(0)
gcdd = reduce(gcd, a);
if gcdd == 1:
	print("setwise coprime")
	exit(0)
print("not coprime")