n = int(input())
l = list(map(int, input().split()))
c = 0
for i in l:
  if i%2 == 0:
    if i%3 != 0 and i%5 != 0:
      c += 1
      break
print("DENIED" if c > 0 else "APPROVED") n = int(input()) n int(input()) int input() input l = list(map(int, input().split())) l list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split c = 0 c 0 for i in l:
  if i%2 == 0:
    if i%3 != 0 and i%5 != 0:
      c += 1
      break i l if i%2 == 0:
    if i%3 != 0 and i%5 != 0:
      c += 1
      break i%2 == 0 i%2 i 2 0 if i%3 != 0 and i%5 != 0:
      c += 1
      break i%3 != 0 and i%5 != 0 i%3 != 0 i%3 i 3 0 i%5 != 0 i%5 i 5 0 c += 1 c 1 break print("DENIED" if c > 0 else "APPROVED") print "DENIED" if c > 0 else "APPROVED" c > 0 c 0 "DENIED" "APPROVED" c = 0 0 c l = list(map(int, input().split())) list(map(int, input().split())) l c += 1 1 c n = int(input()) int(input()) n
n = int(input())
l = list(map(int, input().split()))
c = 0
for i in l:
  if i%2 == 0:
    if i%3 != 0 and i%5 != 0:
      c += 1
      break
print("DENIED" if c > 0 else "APPROVED")