Option Explicit On
Option Strict On

Module Module1

    Sub Main()

        Dim N As Integer = CInt(Console.ReadLine())
        Dim tmp As String() = Split(Console.ReadLine(), " ")
        Dim ret As String = "APPROVED"

        For i As Integer = 0 To tmp.Length - 1
            Dim w As Integer = CInt(tmp(i))
            If w Mod 2 = 0 Then
                If w Mod 3 <> 0 AndAlso w Mod 5 <> 0 Then
                    ret = "DENIED"
                End If
            End If
        Next

        Console.WriteLine(ret)

    End Sub

End Module

