from sys import stdin
input=lambda : stdin.readline().strip()
from math import ceil,sqrt,factorial
from collections import deque
from bisect import bisect_left,bisect_right
def gcd(a,b):
	while a%b!=0:
		a,b=b,a%b
	return b
n=int(input())
l=list(map(int,input().split()))
flag=1
a=l[n-1]
for i in range(n-2,-1,-1):
	t=gcd(max(a,l[i]),min(a,l[i]))
	if t!=1:
		flag=0
		break
	a=(a*l[i])//t
if flag:
	print("pairwise coprime")
	exit()
a=l[0]
for i in range(1,n):
	a=gcd(max(a,l[i]),min(a,l[i]))
if a==1:
	print("setwise coprime")
	exit()
print("not coprime")