N = int(input())
anser = 'APPROVED'
A_list = list(map(int, input().split()))
for A in A_list:
    if A % 2 == 1:
        continue
    if A % 3 == 0:
        continue
    if A % 5 == 0:
        continue
    anser = 'DENIED'
    break
print(anser) N = int(input()) N int(input()) int input() input anser = 'APPROVED' anser 'APPROVED' A_list = list(map(int, input().split())) A_list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for A in A_list:
    if A % 2 == 1:
        continue
    if A % 3 == 0:
        continue
    if A % 5 == 0:
        continue
    anser = 'DENIED'
    break A A_list if A % 2 == 1:
        continue
     A % 2 == 1 A % 2 A 2 1 continue if A % 3 == 0:
        continue
     A % 3 == 0 A % 3 A 3 0 continue if A % 5 == 0:
        continue
     A % 5 == 0 A % 5 A 5 0 continue anser = 'DENIED' anser 'DENIED' break print(anser) print anser anser = 'APPROVED' 'APPROVED' anser A_list = list(map(int, input().split())) list(map(int, input().split())) A_list anser = 'DENIED' 'DENIED' anser N = int(input()) int(input()) N
N = int(input())
anser = 'APPROVED'
A_list = list(map(int, input().split()))
for A in A_list:
    if A % 2 == 1:
        continue
    if A % 3 == 0:
        continue
    if A % 5 == 0:
        continue
    anser = 'DENIED'
    break
print(anser)