n = int(input())
a = list(map(int,input().split()))
ans = True
for i in a:
  if i % 2 == 0:
    if not (i % 3 == 0 or i % 5 == 0):
      ans = False
      break
if ans:
  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 ans = True ans True for i in a:
  if i % 2 == 0:
    if not (i % 3 == 0 or i % 5 == 0):
      ans = False
      break i a if i % 2 == 0:
    if not (i % 3 == 0 or i % 5 == 0):
      ans = False
      break i % 2 == 0 i % 2 i 2 0 if not (i % 3 == 0 or i % 5 == 0):
      ans = False
      break not (i % 3 == 0 or i % 5 == 0) i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 ans = False ans False break if ans:
  print('APPROVED')
else:
  print('DENIED') ans print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' a = list(map(int,input().split())) list(map(int,input().split())) a n = int(input()) int(input()) n ans = True True ans ans = False False ans
n = int(input())
a = list(map(int,input().split()))
ans = True
for i in a:
  if i % 2 == 0:
    if not (i % 3 == 0 or i % 5 == 0):
      ans = False
      break
if ans:
  print('APPROVED')
else:
  print('DENIED')
