from sys import exit



N = int(eval(input()))

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

for a in A:

    if a % 2 == 0:

        if not(a % 3 == 0 or a % 5 == 0):

            print('DENIED')

            exit()

print('APPROVED')

from sys import exit



N = int(eval(input()))

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

for a in A:

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

        print('DENIED')

        exit()

print('APPROVED')

from sys import exit

N = int(eval(input()))
A = tuple(map(int, input().split()))
for a in A:
    if a % 2 == 0:
        if not (a % 3 == 0 or a % 5 == 0):
            print("DENIED")
            exit()
print("APPROVED")

from sys import exit

N = int(eval(input()))
A = tuple(map(int, input().split()))
for a in A:
    if not a % 2 and a % 3 and a % 5:
        print("DENIED")
        exit()
print("APPROVED")

-    if a % 2 == 0: -        if not (a % 3 == 0 or a % 5 == 0): -            print("DENIED") -            exit() +    if not a % 2 and a % 3 and a % 5: +        print("DENIED") +        exit()