import math
n=int(input())
a=list(map(int,input().split()))
pflag=True
sflag=False

if len(set(a))!=n:
  pflag=False
sosu=[1]*(10**6+1)
sosu[0]=0

k=2
while k<(10**5+1)**0.5+1:
  for i in range(2*k,10**5+1,k):
    sosu[i]=0
  if k==2:
    k+=1
  else:
    k+=2
gu=0
for i in range(n):
  if sosu[a[i]]!=1 and gu>1:
    pflag=False
  if a[i]%2==0:
    gu+=1
if pflag == False:
  setwise=a[0]
  for i in range(1,n):
    setwise=math.gcd(setwise,a[i])
  if setwise == 1:
    print("setwise coprime")
  else:
    print("not coprime")
else:
  print('pairwise coprime')