n = int(input())
nums = map(int, input().split())
ok = True
for num in nums:
  if (num % 2 == 0):
    if (num % 3 != 0 and num % 5 != 0):
      ok = False

if(ok):
  print("APPROVED")
else:
  print("DENIED") n = int(input()) n int(input()) int input() input nums = map(int, input().split()) nums map(int, input().split()) map int input().split() ().split () input split ok = True ok True for num in nums:
  if (num % 2 == 0):
    if (num % 3 != 0 and num % 5 != 0):
      ok = False num nums if (num % 2 == 0):
    if (num % 3 != 0 and num % 5 != 0):
      ok = False num % 2 == 0 num % 2 num 2 0 if (num % 3 != 0 and num % 5 != 0):
      ok = False num % 3 != 0 and num % 5 != 0 num % 3 != 0 num % 3 num 3 0 num % 5 != 0 num % 5 num 5 0 ok = False ok False if(ok):
  print("APPROVED")
else:
  print("DENIED") ok print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" ok = False False ok ok = True True ok nums = map(int, input().split()) map(int, input().split()) nums n = int(input()) int(input()) n
n = int(input())
nums = map(int, input().split())
ok = True
for num in nums:
  if (num % 2 == 0):
    if (num % 3 != 0 and num % 5 != 0):
      ok = False

if(ok):
  print("APPROVED")
else:
  print("DENIED")