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

ans = "APPROVED"
for a in A:
    if a%2 == 0 and a%3 > 0 and a%5 > 0:
        ans = "DENIED"
        break
print(ans) 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()] ans = "APPROVED" ans "APPROVED" for a in A:
    if a%2 == 0 and a%3 > 0 and a%5 > 0:
        ans = "DENIED"
        break a A if a%2 == 0 and a%3 > 0 and a%5 > 0:
        ans = "DENIED"
        break a%2 == 0 and a%3 > 0 and a%5 > 0 a%2 == 0 and a%3 > 0 a%2 == 0 a%2 a 2 0 a%3 > 0 a%3 a 3 0 a%5 > 0 a%5 a 5 0 ans = "DENIED" ans "DENIED" break print(ans) print ans ans = "DENIED" "DENIED" ans A = [int(a) for a in input().split()] [int(a) for a in input().split()] A ans = "APPROVED" "APPROVED" ans N = int(input()) int(input()) N
N = int(input())
A = [int(a) for a in input().split()]

ans = "APPROVED"
for a in A:
    if a%2 == 0 and a%3 > 0 and a%5 > 0:
        ans = "DENIED"
        break
print(ans)