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