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()

a.sort()

for i in range(int(max(a) ** 0.5)):
  for j in range(2, 1000):
    if a[i] * j in a:
      print('setwise coprime')
      sys.exit()
      
print('pairwise coprime')