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

result = 'APPROVED'
for i in a:
    if i % 2 == 0:
        if i % 3 != 0:
            if i % 5 != 0:
                result = 'DENIED'
print(result) 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 result = 'APPROVED' result 'APPROVED' for i in a:
    if i % 2 == 0:
        if i % 3 != 0:
            if i % 5 != 0:
                result = 'DENIED' i a if i % 2 == 0:
        if i % 3 != 0:
            if i % 5 != 0:
                result = 'DENIED' i % 2 == 0 i % 2 i 2 0 if i % 3 != 0:
            if i % 5 != 0:
                result = 'DENIED' i % 3 != 0 i % 3 i 3 0 if i % 5 != 0:
                result = 'DENIED' i % 5 != 0 i % 5 i 5 0 result = 'DENIED' result 'DENIED' print(result) print result result = 'DENIED' 'DENIED' result result = 'APPROVED' 'APPROVED' result a = list(map(int, input().split())) list(map(int, input().split())) a n = int(input()) int(input()) n
n = int(input())
a = list(map(int, input().split()))

result = 'APPROVED'
for i in a:
    if i % 2 == 0:
        if i % 3 != 0:
            if i % 5 != 0:
                result = 'DENIED'
print(result)