Imports System

Public Class Program


    Public Shared Sub Main(args As String())

        Console.ReadLine()
        Dim input() As Integer = Array.ConvertAll(Of String, Integer)(Console.ReadLine.Split(" "), AddressOf Integer.Parse)


        For Each i As Integer In input

            If i Mod 2 = 0 Then

                If i Mod 3 = 0 Then

                ElseIf i Mod 5 = 0 Then

                Else
                    Console.WriteLine("DENIED")
                    Return
                End If

            End If

        Next

        Console.WriteLine("APPROVED")

    End Sub



End Class
