# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *                      # ll = deepcopy(l)
from heapq import *                     # heappush(hp,x)
from string import *                    # alpha = ascii_lowercase
from random import *                    # l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from bisect import *                    # bisect_left(arr,x,start,end)  => start and end parameters are temporary
from sys import stdin                   # bisect_left return leftmost position where x should be inserted to keep sorted
from sys import maxsize                 # minn = -maxsize
from operator import *                  # d = sorted(d.items(), key=itemgetter(1))
from itertools import *                 # pre = [0] + list(accumulate(l))
from decimal import Decimal             # a = Decimal(a)    # use this for math questions
from collections import Counter         # d = dict(Counter(l))
from collections import defaultdict     # d = defaultdict(list)

'''
3
3 4 5
'''

def solve(l):
	n = len(l)
	maxx = max(l)
	tmp = [1]*(maxx+1)
	zz = 2
	tmp[0] = tmp[1] = 0
	gg = gcd(l[0],l[1])
	for i in range(2,n):
		gg = gcd(gg,l[i])
	if(gg != 1):
		return 'not coprime'
	d = dict(Counter(l))
	while(zz**2 <= maxx):
		f = 0
		if(tmp[zz]):
			i = 2
			while(i*zz <= maxx):
				tmp[i*zz] = 0
				i += 1
		zz += 1
	for i in range(2,maxx+1):
		if(tmp[i]):
			f = 0
			for j in range(2*i,1000001,i):
				if(j in d):
					f += 1
					if(f > 1):
						return 'setwise coprime'
	return 'pairwise coprime'

N = int(stdin.readline())
l = list(map(int, stdin.readline().rstrip().split()))
ans = solve(l)
print(ans)

