n = int(input())
anums = list(map(int, input().split()))

result = 'APPROVED'
for anum in anums:
    if (anum % 2 == 0) and not ((anum % 3 == 0) or (anum % 5 == 0)):
        result = 'DENIED'
        break

print(result) n = int(input()) n int(input()) int input() input anums = list(map(int, input().split())) anums list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split result = 'APPROVED' result 'APPROVED' for anum in anums:
    if (anum % 2 == 0) and not ((anum % 3 == 0) or (anum % 5 == 0)):
        result = 'DENIED'
        break anum anums if (anum % 2 == 0) and not ((anum % 3 == 0) or (anum % 5 == 0)):
        result = 'DENIED'
        break (anum % 2 == 0) and not ((anum % 3 == 0) or (anum % 5 == 0)) anum % 2 == 0 anum % 2 anum 2 0 not ((anum % 3 == 0) or (anum % 5 == 0)) (anum % 3 == 0) or (anum % 5 == 0) anum % 3 == 0 anum % 3 anum 3 0 anum % 5 == 0 anum % 5 anum 5 0 result = 'DENIED' result 'DENIED' break print(result) print result n = int(input()) int(input()) n result = 'APPROVED' 'APPROVED' result result = 'DENIED' 'DENIED' result anums = list(map(int, input().split())) list(map(int, input().split())) anums
n = int(input())
anums = list(map(int, input().split()))

result = 'APPROVED'
for anum in anums:
    if (anum % 2 == 0) and not ((anum % 3 == 0) or (anum % 5 == 0)):
        result = 'DENIED'
        break

print(result)