def main():

    N, *A = list(map(int, open(0).read().split()))

    print(("DENIED" if sum(

        [1 for Ai in A if not Ai % 2 and Ai % 3 and Ai % 5]) else "APPROVED"))

    return





main()

def main():

    N, *A = list(map(int, open(0).read().split()))

    for Ai in A:

        if not Ai % 2 and Ai % 3 and Ai % 5:

            print("DENIED")

            return

    print("APPROVED")

    return





main()

def main():
    N, *A = list(map(int, open(0).read().split()))
    print(
        (
            "DENIED"
            if sum([1 for Ai in A if not Ai % 2 and Ai % 3 and Ai % 5])
            else "APPROVED"
        )
    )
    return


main()

def main():
    N, *A = list(map(int, open(0).read().split()))
    for Ai in A:
        if not Ai % 2 and Ai % 3 and Ai % 5:
            print("DENIED")
            return
    print("APPROVED")
    return


main()

-    print( -        ( -            "DENIED" -            if sum([1 for Ai in A if not Ai % 2 and Ai % 3 and Ai % 5]) -            else "APPROVED" -        ) -    ) +    for Ai in A: +        if not Ai % 2 and Ai % 3 and Ai % 5: +            print("DENIED") +            return +    print("APPROVED")