n = int(input())
a = list(int(x) for x in input().split() if int(x)%2==0)
ok = True
for i in a:
  if i%3!=0 and i%5!=0:
    print('DENIED')
    ok = False
    break
if ok:
  print('APPROVED') n = int(input()) n int(input()) int input() input a = list(int(x) for x in input().split() if int(x)%2==0) a list(int(x) for x in input().split() if int(x)%2==0) list int(x) int x ok = True ok True for i in a:
  if i%3!=0 and i%5!=0:
    print('DENIED')
    ok = False
    break i a if i%3!=0 and i%5!=0:
    print('DENIED')
    ok = False
    break i%3!=0 and i%5!=0 i%3!=0 i%3 i 3 0 i%5!=0 i%5 i 5 0 print('DENIED') print 'DENIED' ok = False ok False break if ok:
  print('APPROVED') ok print('APPROVED') print 'APPROVED' n = int(input()) int(input()) n ok = False False ok ok = True True ok a = list(int(x) for x in input().split() if int(x)%2==0) list(int(x) for x in input().split() if int(x)%2==0) a
n = int(input())
a = list(int(x) for x in input().split() if int(x)%2==0)
ok = True
for i in a:
  if i%3!=0 and i%5!=0:
    print('DENIED')
    ok = False
    break
if ok:
  print('APPROVED')