import math
from functools import reduce
import sys
 
n = int(input())
a = list(map(int, input().split(' ')))
 
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
  
if gcd_list(a) != 1:
  print('not coprime')
  sys.exit()
 
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')