#k = int(input())
#s = input()
#a, b = map(int, input().split())
#l = list(map(int, input().split()))

n = int(input())
a = list(map(int, input().split()))

ans = "APPROVED"
for i in range(n):
    if (a[i] % 2 == 0):
        if (a[i] % 3 == 0 or a[i] % 5 == 0):
            pass
        else:
            ans = "DENIED"
            break
print(ans) 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 ans = "APPROVED" ans "APPROVED" for i in range(n):
    if (a[i] % 2 == 0):
        if (a[i] % 3 == 0 or a[i] % 5 == 0):
            pass
        else:
            ans = "DENIED"
            break i range(n) range n if (a[i] % 2 == 0):
        if (a[i] % 3 == 0 or a[i] % 5 == 0):
            pass
        else:
            ans = "DENIED"
            break a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 if (a[i] % 3 == 0 or a[i] % 5 == 0):
            pass
        else:
            ans = "DENIED"
            break a[i] % 3 == 0 or a[i] % 5 == 0 a[i] % 3 == 0 a[i] % 3 a[i] a i 3 0 a[i] % 5 == 0 a[i] % 5 a[i] a i 5 0 ans = "DENIED" ans "DENIED" break print(ans) print ans ans = "APPROVED" "APPROVED" ans n = int(input()) int(input()) n a = list(map(int, input().split())) list(map(int, input().split())) a ans = "DENIED" "DENIED" ans
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#l = list(map(int, input().split()))

n = int(input())
a = list(map(int, input().split()))

ans = "APPROVED"
for i in range(n):
    if (a[i] % 2 == 0):
        if (a[i] % 3 == 0 or a[i] % 5 == 0):
            pass
        else:
            ans = "DENIED"
            break
print(ans)
