N = int(input())
lst = list(map(int, input().split()))
c = True
for i in lst:
    if i%2 ==0:
        if i%3 != 0 and i%5 != 0:
            c = False
            break
    
if c:
    print('APPROVED')
else:
    print('DENIED') N = int(input()) N int(input()) int input() input lst = list(map(int, input().split())) lst list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split c = True c True for i in lst:
    if i%2 ==0:
        if i%3 != 0 and i%5 != 0:
            c = False
            break
     i lst if i%2 ==0:
        if i%3 != 0 and i%5 != 0:
            c = False
            break
     i%2 ==0 i%2 i 2 0 if i%3 != 0 and i%5 != 0:
            c = False
            break
     i%3 != 0 and i%5 != 0 i%3 != 0 i%3 i 3 0 i%5 != 0 i%5 i 5 0 c = False c False break if c:
    print('APPROVED')
else:
    print('DENIED') c print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' N = int(input()) int(input()) N c = True True c c = False False c lst = list(map(int, input().split())) list(map(int, input().split())) lst
N = int(input())
lst = list(map(int, input().split()))
c = True
for i in lst:
    if i%2 ==0:
        if i%3 != 0 and i%5 != 0:
            c = False
            break
    
if c:
    print('APPROVED')
else:
    print('DENIED')