# coding: utf-8

num = int(input())
number = input().split()
count, count2 = 0, 0
table = list(number)
for i in number:
    if int(i) % 2 == 0:
        count += 1
        if int(i) % 3 == 0 or int(i) % 5 == 0:
            count2 += 1

if count == count2:
    print("APPROVED")
else:
    print("DENIED") num = int(input()) num int(input()) int input() input number = input().split() number input().split() ().split () input split count, count2 = 0, 0 count 0 count2 0 table = list(number) table list(number) list number for i in number:
    if int(i) % 2 == 0:
        count += 1
        if int(i) % 3 == 0 or int(i) % 5 == 0:
            count2 += 1 i number if int(i) % 2 == 0:
        count += 1
        if int(i) % 3 == 0 or int(i) % 5 == 0:
            count2 += 1 int(i) % 2 == 0 int(i) % 2 int(i) int i 2 0 count += 1 count 1 if int(i) % 3 == 0 or int(i) % 5 == 0:
            count2 += 1 int(i) % 3 == 0 or int(i) % 5 == 0 int(i) % 3 == 0 int(i) % 3 int(i) int i 3 0 int(i) % 5 == 0 int(i) % 5 int(i) int i 5 0 count2 += 1 count2 1 if count == count2:
    print("APPROVED")
else:
    print("DENIED") count == count2 count count2 print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" num = int(input()) int(input()) num count += 1 1 count count, count2 = 0, 0 0 count table = list(number) list(number) table count2 += 1 1 count2 number = input().split() input().split() number count2 = 0, 0 0 count2
# coding: utf-8

num = int(input())
number = input().split()
count, count2 = 0, 0
table = list(number)
for i in number:
    if int(i) % 2 == 0:
        count += 1
        if int(i) % 3 == 0 or int(i) % 5 == 0:
            count2 += 1

if count == count2:
    print("APPROVED")
else:
    print("DENIED")