

N = int(eval(input()))

A = list(map(int,input().split()))



for e in A:

    if e%2 == 0:

        if e%3 != 0 and e%5 != 0:

            print("DENIED")

            exit(0)

print("APPROVED")

import sys

def input():

    return sys.stdin.readline()[:-1]

def main():

    N = int(eval(input()))

    A = list(map(int,input().split()))

    for e in A:

        if e%2 == 0:

            if e%3 != 0 and e%5 != 0:

                print("DENIED")

                exit(0)

    print("APPROVED")



if __name__ == '__main__':

    main()

N = int(eval(input()))
A = list(map(int, input().split()))
for e in A:
    if e % 2 == 0:
        if e % 3 != 0 and e % 5 != 0:
            print("DENIED")
            exit(0)
print("APPROVED")

import sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    for e in A:
        if e % 2 == 0:
            if e % 3 != 0 and e % 5 != 0:
                print("DENIED")
                exit(0)
    print("APPROVED")


if __name__ == "__main__":
    main()

-N = int(eval(input())) -A = list(map(int, input().split())) -for e in A: -    if e % 2 == 0: -        if e % 3 != 0 and e % 5 != 0: -            print("DENIED") -            exit(0) -print("APPROVED") +import sys + + +def input(): +    return sys.stdin.readline()[:-1] + + +def main(): +    N = int(eval(input())) +    A = list(map(int, input().split())) +    for e in A: +        if e % 2 == 0: +            if e % 3 != 0 and e % 5 != 0: +                print("DENIED") +                exit(0) +    print("APPROVED") + + +if __name__ == "__main__": +    main()