n = int(input())
a = [int(i) for i in input().split()]
ans = 'APPROVED'
for ai in a:
  if ai % 2 == 0 and ai % 3 != 0 and ai % 5 != 0:
    ans = "DENIED"
print(ans) n = int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i a = [int(i) for i in input().split()] a [int(i) for i in input().split()] ans = 'APPROVED' ans 'APPROVED' for ai in a:
  if ai % 2 == 0 and ai % 3 != 0 and ai % 5 != 0:
    ans = "DENIED" ai a if ai % 2 == 0 and ai % 3 != 0 and ai % 5 != 0:
    ans = "DENIED" ai % 2 == 0 and ai % 3 != 0 and ai % 5 != 0 ai % 2 == 0 and ai % 3 != 0 ai % 2 == 0 ai % 2 ai 2 0 ai % 3 != 0 ai % 3 ai 3 0 ai % 5 != 0 ai % 5 ai 5 0 ans = "DENIED" ans "DENIED" print(ans) print ans a = [int(i) for i in input().split()] [int(i) for i in input().split()] a n = int(input()) int(input()) n ans = "DENIED" "DENIED" ans ans = 'APPROVED' 'APPROVED' ans
n = int(input())
a = [int(i) for i in input().split()]
ans = 'APPROVED'
for ai in a:
  if ai % 2 == 0 and ai % 3 != 0 and ai % 5 != 0:
    ans = "DENIED"
print(ans)