Imports System

Module Program
    Sub Main(args As String())
        Dim N As Integer = Console.ReadLine()
        Dim tmpA As String() = Split(Console.ReadLine(), " ")


        Dim A(N) As Integer
        Dim i As Integer = 1
        For i = 1 To N
            A(i) = CInt(tmpA(i - 1))
        Next

        For i = 1 To N
            If A(i) Mod 2 = 0 Then
                If A(i) Mod 3 = 0 Or A(i) Mod 5 = 0 Then
                Else
                    Console.WriteLine("DENIED")
                    Exit Sub
                End If
            End If
        Next
        Console.WriteLine("APPROVED")
    End Sub
End Module
