N = int(input())
A = list(map(int, input().split()))

result = "APPROVED"
for a in A:
    if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            result = "DENIED"

print(result) N = int(input()) N int(input()) int input() input A = list(map(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split result = "APPROVED" result "APPROVED" for a in A:
    if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            result = "DENIED" a A if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            result = "DENIED" a % 2 == 0 a % 2 a 2 0 if a % 3 != 0 and a % 5 != 0:
            result = "DENIED" a % 3 != 0 and a % 5 != 0 a % 3 != 0 a % 3 a 3 0 a % 5 != 0 a % 5 a 5 0 result = "DENIED" result "DENIED" print(result) print result result = "APPROVED" "APPROVED" result result = "DENIED" "DENIED" result N = int(input()) int(input()) N A = list(map(int, input().split())) list(map(int, input().split())) A
N = int(input())
A = list(map(int, input().split()))

result = "APPROVED"
for a in A:
    if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            result = "DENIED"

print(result)