n = int(input())
a = map(int, input().split())

ans = 'APPROVED'
for a_i in a:
    if a_i % 2 == 0:
        if not ((a_i % 3 == 0) or (a_i % 5 == 0)):
            ans = 'DENIED' 
            break
print(ans) n = int(input()) n int(input()) int input() input a = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split ans = 'APPROVED' ans 'APPROVED' for a_i in a:
    if a_i % 2 == 0:
        if not ((a_i % 3 == 0) or (a_i % 5 == 0)):
            ans = 'DENIED' 
            break a_i a if a_i % 2 == 0:
        if not ((a_i % 3 == 0) or (a_i % 5 == 0)):
            ans = 'DENIED' 
            break a_i % 2 == 0 a_i % 2 a_i 2 0 if not ((a_i % 3 == 0) or (a_i % 5 == 0)):
            ans = 'DENIED' 
            break not ((a_i % 3 == 0) or (a_i % 5 == 0)) (a_i % 3 == 0) or (a_i % 5 == 0) a_i % 3 == 0 a_i % 3 a_i 3 0 a_i % 5 == 0 a_i % 5 a_i 5 0 ans = 'DENIED' ans 'DENIED' break print(ans) print ans a = map(int, input().split()) map(int, input().split()) a ans = 'APPROVED' 'APPROVED' ans ans = 'DENIED' 'DENIED' ans n = int(input()) int(input()) n
n = int(input())
a = map(int, input().split())

ans = 'APPROVED'
for a_i in a:
    if a_i % 2 == 0:
        if not ((a_i % 3 == 0) or (a_i % 5 == 0)):
            ans = 'DENIED' 
            break
print(ans)
