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

even = []

for i in ai:
    if i%2 == 0:
        even.append(i)

ok = 0
for i in even:
    if i%3==0 or i%5==0:
        ok += 1

if len(even) == ok:
    print('APPROVED')
else:
    print('DENIED') n = int(input()) n int(input()) int input() input ai = list(map(int,input().split())) ai list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split even = [] even [] for i in ai:
    if i%2 == 0:
        even.append(i) i ai if i%2 == 0:
        even.append(i) i%2 == 0 i%2 i 2 0 even.append(i) even.append even append i ok = 0 ok 0 for i in even:
    if i%3==0 or i%5==0:
        ok += 1 i even if i%3==0 or i%5==0:
        ok += 1 i%3==0 or i%5==0 i%3==0 i%3 i 3 0 i%5==0 i%5 i 5 0 ok += 1 ok 1 if len(even) == ok:
    print('APPROVED')
else:
    print('DENIED') len(even) == ok len(even) len even ok print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' ai = list(map(int,input().split())) list(map(int,input().split())) ai ok = 0 0 ok n = int(input()) int(input()) n even = [] [] even ok += 1 1 ok
n = int(input())
ai = list(map(int,input().split()))

even = []

for i in ai:
    if i%2 == 0:
        even.append(i)

ok = 0
for i in even:
    if i%3==0 or i%5==0:
        ok += 1

if len(even) == ok:
    print('APPROVED')
else:
    print('DENIED')
