import math

N=int(input())
A=list(map(int,input().split()))
prod = 1
stw = A[0]
for i in range(0,N):
  prod*=A[i]
  stw=math.gcd(stw,A[i])
prw = True
for i in range(0,N):
  if math.gcd(A[i],prod//A[i]) != 1:
    prw=False
    break
if prw:
  print('pairwise coprime')
elif stw == 1:
  print('setwise coprime')
else:
  print('not coprime')