N=int(input())
A=[int(a) for a in input().split()]

for a in A:
  if not a%2:
    if (a%3!=0 and a%5!=0):
      print('DENIED')
      break
else:
  print('APPROVED') N=int(input()) N int(input()) int input() input int(a) for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() int(a) int a A=[int(a) for a in input().split()] A [int(a) for a in input().split()] for a in A:
  if not a%2:
    if (a%3!=0 and a%5!=0):
      print('DENIED')
      break
else:
  print('APPROVED') a A if not a%2:
    if (a%3!=0 and a%5!=0):
      print('DENIED')
      break not a%2 a%2 a 2 if (a%3!=0 and a%5!=0):
      print('DENIED')
      break a%3!=0 and a%5!=0 a%3!=0 a%3 a 3 0 a%5!=0 a%5 a 5 0 print('DENIED') print 'DENIED' break print('APPROVED') print 'APPROVED' A=[int(a) for a in input().split()] [int(a) for a in input().split()] A N=int(input()) int(input()) N
N=int(input())
A=[int(a) for a in input().split()]

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