n = int(input())
list_a = [int(m) for m in input().split()]
for i in list_a:
    if i % 2 != 0:
        continue
    elif not (i % 3 == 0 or i % 5 == 0):
        print("DENIED")
        exit()
print("APPROVED") n = int(input()) n int(input()) int input() input int(m) for m in input().split() for m in input().split() m input().split() ().split () input split for m in input().split() int(m) int m list_a = [int(m) for m in input().split()] list_a [int(m) for m in input().split()] for i in list_a:
    if i % 2 != 0:
        continue
    elif not (i % 3 == 0 or i % 5 == 0):
        print("DENIED")
        exit() i list_a if i % 2 != 0:
        continue
    elif not (i % 3 == 0 or i % 5 == 0):
        print("DENIED")
        exit() i % 2 != 0 i % 2 i 2 0 continue elif not (i % 3 == 0 or i % 5 == 0):
        print("DENIED")
        exit() not (i % 3 == 0 or i % 5 == 0) i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 print("DENIED") print "DENIED" exit() exit print("APPROVED") print "APPROVED" list_a = [int(m) for m in input().split()] [int(m) for m in input().split()] list_a n = int(input()) int(input()) n
n = int(input())
list_a = [int(m) for m in input().split()]
for i in list_a:
    if i % 2 != 0:
        continue
    elif not (i % 3 == 0 or i % 5 == 0):
        print("DENIED")
        exit()
print("APPROVED")