import math
n = int(input())
a = list(map(int, input().split()))

r = [0] * (n+1)

for i in range(n):
  r[i+1] = math.gcd(r[i],a[i])

flg = False
for i in range(n-1):
  if r[i+2] > 1:
    flg = True

if r[-1] == 1:
  if flg == False:
    print ('pairwise coprime')
  else:
    print ('setwise coprime')
else:
  print ('not coprime')
