def main():
  n = int(input())
  a = list(map(int,input().split()))
  flg=0
  for i in range(0,n):
    if a[i]%2==0 :
      if a[i]%3!=0 and a[i]%5!=0 :
        flg=1
  if flg==0:
    print("APPROVED")
  else:
    print("DENIED")
main() def main():
  n = int(input())
  a = list(map(int,input().split()))
  flg=0
  for i in range(0,n):
    if a[i]%2==0 :
      if a[i]%3!=0 and a[i]%5!=0 :
        flg=1
  if flg==0:
    print("APPROVED")
  else:
    print("DENIED") main 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 flg=0 flg 0 for i in range(0,n):
    if a[i]%2==0 :
      if a[i]%3!=0 and a[i]%5!=0 :
        flg=1
   i range(0,n) range 0 n if a[i]%2==0 :
      if a[i]%3!=0 and a[i]%5!=0 :
        flg=1
   a[i]%2==0 a[i]%2 a[i] a i 2 0 if a[i]%3!=0 and a[i]%5!=0 :
        flg=1
   a[i]%3!=0 and a[i]%5!=0 a[i]%3!=0 a[i]%3 a[i] a i 3 0 a[i]%5!=0 a[i]%5 a[i] a i 5 0 flg=1 flg 1 if flg==0:
    print("APPROVED")
  else:
    print("DENIED") flg==0 flg 0 print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" main() main def main():
  n = int(input())
  a = list(map(int,input().split()))
  flg=0
  for i in range(0,n):
    if a[i]%2==0 :
      if a[i]%3!=0 and a[i]%5!=0 :
        flg=1
  if flg==0:
    print("APPROVED")
  else:
    print("DENIED") def main():
  n = int(input())
  a = list(map(int,input().split()))
  flg=0
  for i in range(0,n):
    if a[i]%2==0 :
      if a[i]%3!=0 and a[i]%5!=0 :
        flg=1
  if flg==0:
    print("APPROVED")
  else:
    print("DENIED") main
def main():
  n = int(input())
  a = list(map(int,input().split()))
  flg=0
  for i in range(0,n):
    if a[i]%2==0 :
      if a[i]%3!=0 and a[i]%5!=0 :
        flg=1
  if flg==0:
    print("APPROVED")
  else:
    print("DENIED")
main()