f = "APPROVED"
n = int(input())
a = list(map(int, input().split()))
for i in a:
    if not (i&1) and i%3!=0 and i%5!=0:
        f = "DENIED"
print(f) f = "APPROVED" f "APPROVED" n = int(input()) n int(input()) int input() input a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in a:
    if not (i&1) and i%3!=0 and i%5!=0:
        f = "DENIED" i a if not (i&1) and i%3!=0 and i%5!=0:
        f = "DENIED" not (i&1) and i%3!=0 and i%5!=0 not (i&1) and i%3!=0 not (i&1) i&1 i 1 i%3!=0 i%3 i 3 0 i%5!=0 i%5 i 5 0 f = "DENIED" f "DENIED" print(f) print f n = int(input()) int(input()) n a = list(map(int, input().split())) list(map(int, input().split())) a f = "DENIED" "DENIED" f f = "APPROVED" "APPROVED" f
f = "APPROVED"
n = int(input())
a = list(map(int, input().split()))
for i in a:
    if not (i&1) and i%3!=0 and i%5!=0:
        f = "DENIED"
print(f)