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

judge = True
for i in range(n):
    if a[i]%2 == 0:
        if a[i]%3 != 0 and a[i]%5 != 0:
            judge = False
            break

if judge:
    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 judge = True judge True for i in range(n):
    if a[i]%2 == 0:
        if a[i]%3 != 0 and a[i]%5 != 0:
            judge = False
            break i range(n) range n if a[i]%2 == 0:
        if a[i]%3 != 0 and a[i]%5 != 0:
            judge = False
            break a[i]%2 == 0 a[i]%2 a[i] a i 2 0 if a[i]%3 != 0 and a[i]%5 != 0:
            judge = False
            break a[i]%3 != 0 and a[i]%5 != 0 a[i]%3 != 0 a[i]%3 a[i] a i 3 0 a[i]%5 != 0 a[i]%5 a[i] a i 5 0 judge = False judge False break if judge:
    print('APPROVED')
else:
    print('DENIED') judge print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' judge = True True judge a = list(map(int, input().split())) list(map(int, input().split())) a judge = False False judge n = int(input()) int(input()) n
#155_B
n = int(input())
a = list(map(int, input().split()))

judge = True
for i in range(n):
    if a[i]%2 == 0:
        if a[i]%3 != 0 and a[i]%5 != 0:
            judge = False
            break

if judge:
    print('APPROVED')
else:
    print('DENIED')