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

count = 0
for item in A:
  if item % 2 == 0:
    if item % 3 == 0 or item % 5 == 0:
      count += 1
  else:
    count += 1

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

count = 0
for item in A:
  if item % 2 == 0:
    if item % 3 == 0 or item % 5 == 0:
      count += 1
  else:
    count += 1

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