n = int(input())
A = list(map(int, input().split( )))
cnt = 1

for a in A:
  if cnt == 0:continue
  if a%2 == 0:
    if a%3 !=0 and a%5 !=0:
      cnt = 0
if cnt != 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 cnt = 1 cnt 1 for a in A:
  if cnt == 0:continue
  if a%2 == 0:
    if a%3 !=0 and a%5 !=0:
      cnt = 0 a A if cnt == 0:continue
   cnt == 0 cnt 0 if a%2 == 0:
    if a%3 !=0 and a%5 !=0:
      cnt = 0 a%2 == 0 a%2 a 2 0 if a%3 !=0 and a%5 !=0:
      cnt = 0 a%3 !=0 and a%5 !=0 a%3 !=0 a%3 a 3 0 a%5 !=0 a%5 a 5 0 cnt = 0 cnt 0 if cnt != 0:
  print('APPROVED')
else:
  print('DENIED') cnt != 0 cnt 0 print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' cnt = 1 1 cnt n = int(input()) int(input()) n A = list(map(int, input().split( ))) list(map(int, input().split( ))) A cnt = 0 0 cnt
n = int(input())
A = list(map(int, input().split( )))
cnt = 1

for a in A:
  if cnt == 0:continue
  if a%2 == 0:
    if a%3 !=0 and a%5 !=0:
      cnt = 0
if cnt != 0:
  print('APPROVED')
else:
  print('DENIED')