MM = int(input())
AA = input().split()
count = 0
for j in AA:
  i = int(j)
  if i%2 ==0:
    if i%3 !=0 and i%5 !=0:
      count +=1
if count == 0:
  print('APPROVED')
else:
  print('DENIED') MM = int(input()) MM int(input()) int input() input AA = input().split() AA input().split() ().split () input split count = 0 count 0 for j in AA:
  i = int(j)
  if i%2 ==0:
    if i%3 !=0 and i%5 !=0:
      count +=1 j AA i = int(j) i int(j) int j if i%2 ==0:
    if i%3 !=0 and i%5 !=0:
      count +=1 i%2 ==0 i%2 i 2 0 if i%3 !=0 and i%5 !=0:
      count +=1 i%3 !=0 and i%5 !=0 i%3 !=0 i%3 i 3 0 i%5 !=0 i%5 i 5 0 count +=1 count 1 if count == 0:
  print('APPROVED')
else:
  print('DENIED') count == 0 count 0 print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' AA = input().split() input().split() AA count +=1 1 count MM = int(input()) int(input()) MM i = int(j) int(j) i count = 0 0 count
MM = int(input())
AA = input().split()
count = 0
for j in AA:
  i = int(j)
  if i%2 ==0:
    if i%3 !=0 and i%5 !=0:
      count +=1
if count == 0:
  print('APPROVED')
else:
  print('DENIED')