program main
  implicit none
  integer :: i, n
  integer, allocatable :: a(:) 
  logical :: judge

  read *, n
  allocate(a(n))
  read *, a

  do i = 1, n
    judge = (mod(a(i), 2) /= 0 .or. mod(a(i), 3) == 0 .or. mod(a(i), 5) == 0)
    if (.not. judge) exit
  end do
  if (judge) then
    print '(a)', "APPROVED"
  else
    print '(a)', "DENIED"
  end if

end program