N = int(input())
A = list(map(int, input().split()))
count = 0
sat = 0
for a in A:
    if a % 2 == 0:
        count += 1
        if a % 3 == 0 or a % 5 ==0:
            sat += 1
if count == sat:
    print('APPROVED')
else:
    print('DENIED') 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 count = 0 count 0 sat = 0 sat 0 for a in A:
    if a % 2 == 0:
        count += 1
        if a % 3 == 0 or a % 5 ==0:
            sat += 1 a A if a % 2 == 0:
        count += 1
        if a % 3 == 0 or a % 5 ==0:
            sat += 1 a % 2 == 0 a % 2 a 2 0 count += 1 count 1 if a % 3 == 0 or a % 5 ==0:
            sat += 1 a % 3 == 0 or a % 5 ==0 a % 3 == 0 a % 3 a 3 0 a % 5 ==0 a % 5 a 5 0 sat += 1 sat 1 if count == sat:
    print('APPROVED')
else:
    print('DENIED') count == sat count sat print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' count = 0 0 count sat = 0 0 sat count += 1 1 count A = list(map(int, input().split())) list(map(int, input().split())) A sat += 1 1 sat N = int(input()) int(input()) N
N = int(input())
A = list(map(int, input().split()))
count = 0
sat = 0
for a in A:
    if a % 2 == 0:
        count += 1
        if a % 3 == 0 or a % 5 ==0:
            sat += 1
if count == sat:
    print('APPROVED')
else:
    print('DENIED')