n=int(input())
a=[int(x) for x in input().split()]
b=[y for y in a if y%2 == 0]
c=0
for i in b:
    if i%3 == 0 or i%5 == 0:
        pass
    else:
        print("DENIED")
        c=1
        break
        
if c==0:
    print("APPROVED") n=int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a=[int(x) for x in input().split()] a [int(x) for x in input().split()] y for y in a if y%2 == 0 for y in a if y%2 == 0 y a y%2 == 0 y%2 y 2 0 if y%2 == 0 y b=[y for y in a if y%2 == 0] b [y for y in a if y%2 == 0] c=0 c 0 for i in b:
    if i%3 == 0 or i%5 == 0:
        pass
    else:
        print("DENIED")
        c=1
        break
         i b if i%3 == 0 or i%5 == 0:
        pass
    else:
        print("DENIED")
        c=1
        break
         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" c=1 c 1 break if c==0:
    print("APPROVED") c==0 c 0 print("APPROVED") print "APPROVED" c=1 1 c n=int(input()) int(input()) n b=[y for y in a if y%2 == 0] [y for y in a if y%2 == 0] b a=[int(x) for x in input().split()] [int(x) for x in input().split()] a c=0 0 c
n=int(input())
a=[int(x) for x in input().split()]
b=[y for y in a if y%2 == 0]
c=0
for i in b:
    if i%3 == 0 or i%5 == 0:
        pass
    else:
        print("DENIED")
        c=1
        break
        
if c==0:
    print("APPROVED")