# B - Papers, Please

N = int(input())
my_list = list(input().split())
j = 0

for i in range(0, N):
    if int(my_list[i]) % 2 == 0:
        if int(my_list[i]) % 3 != 0 and int(my_list[i]) % 5 != 0:
            j += 1

if j != 0:
    print('DENIED')
else:
    print('APPROVED') N = int(input()) N int(input()) int input() input my_list = list(input().split()) my_list list(input().split()) list input().split() ().split () input split j = 0 j 0 for i in range(0, N):
    if int(my_list[i]) % 2 == 0:
        if int(my_list[i]) % 3 != 0 and int(my_list[i]) % 5 != 0:
            j += 1 i range(0, N) range 0 N if int(my_list[i]) % 2 == 0:
        if int(my_list[i]) % 3 != 0 and int(my_list[i]) % 5 != 0:
            j += 1 int(my_list[i]) % 2 == 0 int(my_list[i]) % 2 int(my_list[i]) int my_list[i] my_list i 2 0 if int(my_list[i]) % 3 != 0 and int(my_list[i]) % 5 != 0:
            j += 1 int(my_list[i]) % 3 != 0 and int(my_list[i]) % 5 != 0 int(my_list[i]) % 3 != 0 int(my_list[i]) % 3 int(my_list[i]) int my_list[i] my_list i 3 0 int(my_list[i]) % 5 != 0 int(my_list[i]) % 5 int(my_list[i]) int my_list[i] my_list i 5 0 j += 1 j 1 if j != 0:
    print('DENIED')
else:
    print('APPROVED') j != 0 j 0 print('DENIED') print 'DENIED' print('APPROVED') print 'APPROVED' j += 1 1 j j = 0 0 j N = int(input()) int(input()) N my_list = list(input().split()) list(input().split()) my_list
# B - Papers, Please

N = int(input())
my_list = list(input().split())
j = 0

for i in range(0, N):
    if int(my_list[i]) % 2 == 0:
        if int(my_list[i]) % 3 != 0 and int(my_list[i]) % 5 != 0:
            j += 1

if j != 0:
    print('DENIED')
else:
    print('APPROVED')
