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

for i in range(len(a)):
    if a[i] % 3 == 0 or a[i] % 5 == 0:
        count += 1

if count == len(a):
    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 a = list() a list() list count = 0 count 0 for i in range(n):
    if lst[i] % 2 == 0:
        a.append(lst[i]) i range(n) range n if lst[i] % 2 == 0:
        a.append(lst[i]) lst[i] % 2 == 0 lst[i] % 2 lst[i] lst i 2 0 a.append(lst[i]) a.append a append lst[i] lst i for i in range(len(a)):
    if a[i] % 3 == 0 or a[i] % 5 == 0:
        count += 1 i range(len(a)) range len(a) len a if a[i] % 3 == 0 or a[i] % 5 == 0:
        count += 1 a[i] % 3 == 0 or 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 count += 1 count 1 if count == len(a):
    print("APPROVED")
else:
    print("DENIED") count == len(a) count len(a) len a print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" count = 0 0 count n = int(input()) int(input()) n count += 1 1 count a = list() list() a lst = list(map(int, input().split())) list(map(int, input().split())) lst
n = int(input())
lst = list(map(int, input().split()))
a = list()
count = 0
for i in range(n):
    if lst[i] % 2 == 0:
        a.append(lst[i])

for i in range(len(a)):
    if a[i] % 3 == 0 or a[i] % 5 == 0:
        count += 1

if count == len(a):
    print("APPROVED")
else:
    print("DENIED")