n = int(input())
a = list(map(int,input().split()))
even_list = []
for i in range(n):
    if a[i] % 2 == 0:
        even_list.append(a[i])

x = 0
for m in range(len(even_list)):
    if even_list[m] % 3 == 0 or even_list[m] % 5 == 0:
        x += 1

if  x == len(even_list):
    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 even_list = [] even_list [] for i in range(n):
    if a[i] % 2 == 0:
        even_list.append(a[i]) i range(n) range n if a[i] % 2 == 0:
        even_list.append(a[i]) a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 even_list.append(a[i]) even_list.append even_list append a[i] a i x = 0 x 0 for m in range(len(even_list)):
    if even_list[m] % 3 == 0 or even_list[m] % 5 == 0:
        x += 1 m range(len(even_list)) range len(even_list) len even_list if even_list[m] % 3 == 0 or even_list[m] % 5 == 0:
        x += 1 even_list[m] % 3 == 0 or even_list[m] % 5 == 0 even_list[m] % 3 == 0 even_list[m] % 3 even_list[m] even_list m 3 0 even_list[m] % 5 == 0 even_list[m] % 5 even_list[m] even_list m 5 0 x += 1 x 1 if  x == len(even_list):
    print('APPROVED')

else:
    print('DENIED') x == len(even_list) x len(even_list) len even_list print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' x = 0 0 x n = int(input()) int(input()) n a = list(map(int,input().split())) list(map(int,input().split())) a x += 1 1 x even_list = [] [] even_list
n = int(input())
a = list(map(int,input().split()))
even_list = []
for i in range(n):
    if a[i] % 2 == 0:
        even_list.append(a[i])

x = 0
for m in range(len(even_list)):
    if even_list[m] % 3 == 0 or even_list[m] % 5 == 0:
        x += 1

if  x == len(even_list):
    print('APPROVED')

else:
    print('DENIED')