program ABC155B
    implicit none
    integer(8)::N,i
    integer(8)::flg=0!承認
    integer(8),allocatable,dimension(:)::A
    read(5,*)N
    allocate(A(N))
    read(5,*)(A(i),i=1,N)

    do i=1,N
        if(mod(A(i),2)==0)then
            if(mod(A(i),3)/=0.and.mod(A(i),5)/=0)then
                flg=1
                exit
            end if
        end if
    end do

    if(flg==0)then
        print'(A)',"APPROVED"
    else
        print'(A)',"DENIED"
    end if
end program ABC155B