N = input()
A = map(int, input().split())
ok = True
for a in A:
  if a % 2 == 0 and a % 3 and a % 5:
    ok = False
    break
print('APPROVED' if ok else 'DENIED') N = input() N input() input A = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split ok = True ok True for a in A:
  if a % 2 == 0 and a % 3 and a % 5:
    ok = False
    break a A if a % 2 == 0 and a % 3 and a % 5:
    ok = False
    break a % 2 == 0 and a % 3 and a % 5 a % 2 == 0 and a % 3 a % 2 == 0 a % 2 a 2 0 a % 3 a 3 a % 5 a 5 ok = False ok False break print('APPROVED' if ok else 'DENIED') print 'APPROVED' if ok else 'DENIED' ok 'APPROVED' 'DENIED' ok = True True ok N = input() input() N A = map(int, input().split()) map(int, input().split()) A ok = False False ok
N = input()
A = map(int, input().split())
ok = True
for a in A:
  if a % 2 == 0 and a % 3 and a % 5:
    ok = False
    break
print('APPROVED' if ok else 'DENIED')