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

cnt = 0
l = []
for i in A:
    if i % 2 == 0:
        l.append(i)
        cnt += 1

ans = 0
for i in l:
    if i % 3 == 0 or i % 5 == 0:
        ans += 1

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

cnt = 0
l = []
for i in A:
    if i % 2 == 0:
        l.append(i)
        cnt += 1

ans = 0
for i in l:
    if i % 3 == 0 or i % 5 == 0:
        ans += 1

if ans == cnt:
    print("APPROVED")
else:
    print("DENIED")