import sys
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

n = int(input())
a = tuple(map(int,input().split()))

for i in range(n):
  for j in range(i+1,n):
    if (gcd(a[i],a[j]) != 1): 
    	if (gcd(*a) == 1):
      		print("setwise coprime")
      		sys.exit()
    	else:
      		print("not coprime")
      		sys.exit()
print("pairwise coprime")