n = int(input())
p = list(map(int,input().split()))

for x in p:
  if x % 2 == 0:
    if x % 3 != 0 and x % 5 != 0:
      print("DENIED")
      break

else :
  print("APPROVED") n = int(input()) n int(input()) int input() input p = list(map(int,input().split())) p list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for x in p:
  if x % 2 == 0:
    if x % 3 != 0 and x % 5 != 0:
      print("DENIED")
      break

else :
  print("APPROVED") x p if x % 2 == 0:
    if x % 3 != 0 and x % 5 != 0:
      print("DENIED")
      break x % 2 == 0 x % 2 x 2 0 if x % 3 != 0 and x % 5 != 0:
      print("DENIED")
      break x % 3 != 0 and x % 5 != 0 x % 3 != 0 x % 3 x 3 0 x % 5 != 0 x % 5 x 5 0 print("DENIED") print "DENIED" break print("APPROVED") print "APPROVED" n = int(input()) int(input()) n p = list(map(int,input().split())) list(map(int,input().split())) p
n = int(input())
p = list(map(int,input().split()))

for x in p:
  if x % 2 == 0:
    if x % 3 != 0 and x % 5 != 0:
      print("DENIED")
      break

else :
  print("APPROVED")