import sys
import math

n = int(input())
a = sorted(map(int,input().split()), reverse =True)

ans = a[0]
for i in range(1, n):
    ans = ans * a[i] // math.gcd(ans, a[i])
    
if ans != 1:
  print("not coprime")
  sys.exit()

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

print("pairwise coprime")