import numpy
n = int(input())
arr = list(map(int,input().split()))
x = 1
for i in range(n-1):
  for j in range(i+1,n):
    if numpy.gcd(arr[i],arr[i+1]) != 1 :
      x = 0
      break
if x == 0:
  if numpy.gcd.reduce(arr) == 1: print('setwise coprime')
  else: print('not coprime')
else : print('pairwise coprime')