prime = sieve_of_eratosthenes(2*10**5+1)
g = gcd_list(A)
if g != 1: print('not coprime');exit();

for p in prime:
  cnt = 0
  for a in A:
    if a%p == 0: cnt += 1
    if cnt == 2:
      print('setwise coprime')
      exit()
print('pairwise coprime')
