program ABC155_B
  integer,allocatable::A(:)
  read(*,*)N
  allocate(A(N))
  read(*,*)A
  k=0
  do i=1,N
     if(A(i)/2*2==A(i)) then
        if(mod(A(i),3)/=0 .and. mod(A(i),5)/=0) then
           k=k+1
           exit
        end if
     end if
  end do
  if(k==0) then
     write(*,*)'APPROVED'
  else
     write(*,*)'DENIED'
  end if
end program ABC155_B