N = int(input())
A = list(map(int, input().split()))

even = []
approved = 0

for i in A:
    if i % 2 == 0:
        even.append(i)

for x in even:
    if x % 3 == 0 or x % 5 == 0:
        approved += 1

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

even = []
approved = 0

for i in A:
    if i % 2 == 0:
        even.append(i)

for x in even:
    if x % 3 == 0 or x % 5 == 0:
        approved += 1

if approved == len(even):
    print("APPROVED")
else:
    print("DENIED")
