n=int(input())

a_list=[int(i) for i in input().split()]

ans="APPROVED"
for i in a_list:
    if i%2==0:
        if i%3!=0 and i%5!=0:
            ans="DENIED"
            
print(ans) n=int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i a_list=[int(i) for i in input().split()] a_list [int(i) for i in input().split()] ans="APPROVED" ans "APPROVED" for i in a_list:
    if i%2==0:
        if i%3!=0 and i%5!=0:
            ans="DENIED"
             i a_list if i%2==0:
        if i%3!=0 and i%5!=0:
            ans="DENIED"
             i%2==0 i%2 i 2 0 if i%3!=0 and i%5!=0:
            ans="DENIED"
             i%3!=0 and i%5!=0 i%3!=0 i%3 i 3 0 i%5!=0 i%5 i 5 0 ans="DENIED" ans "DENIED" print(ans) print ans ans="APPROVED" "APPROVED" ans ans="DENIED" "DENIED" ans n=int(input()) int(input()) n a_list=[int(i) for i in input().split()] [int(i) for i in input().split()] a_list
n=int(input())

a_list=[int(i) for i in input().split()]

ans="APPROVED"
for i in a_list:
    if i%2==0:
        if i%3!=0 and i%5!=0:
            ans="DENIED"
            
print(ans)