a = int(input())
b = input().split()
c = "APPROVED"
for i in range(a):
    if int(b[i]) % 2 == 0:
        if int(b[i]) % 3 == 0 or int(b[i]) % 5 == 0:
            c = "APPROVED"
        else:
            c = "DENIED"
            break
print(c) a = int(input()) a int(input()) int input() input b = input().split() b input().split() ().split () input split c = "APPROVED" c "APPROVED" for i in range(a):
    if int(b[i]) % 2 == 0:
        if int(b[i]) % 3 == 0 or int(b[i]) % 5 == 0:
            c = "APPROVED"
        else:
            c = "DENIED"
            break i range(a) range a if int(b[i]) % 2 == 0:
        if int(b[i]) % 3 == 0 or int(b[i]) % 5 == 0:
            c = "APPROVED"
        else:
            c = "DENIED"
            break int(b[i]) % 2 == 0 int(b[i]) % 2 int(b[i]) int b[i] b i 2 0 if int(b[i]) % 3 == 0 or int(b[i]) % 5 == 0:
            c = "APPROVED"
        else:
            c = "DENIED"
            break int(b[i]) % 3 == 0 or int(b[i]) % 5 == 0 int(b[i]) % 3 == 0 int(b[i]) % 3 int(b[i]) int b[i] b i 3 0 int(b[i]) % 5 == 0 int(b[i]) % 5 int(b[i]) int b[i] b i 5 0 c = "APPROVED" c "APPROVED" c = "DENIED" c "DENIED" break print(c) print c c = "APPROVED" "APPROVED" c c = "DENIED" "DENIED" c a = int(input()) int(input()) a b = input().split() input().split() b c = "APPROVED" "APPROVED" c
a = int(input())
b = input().split()
c = "APPROVED"
for i in range(a):
    if int(b[i]) % 2 == 0:
        if int(b[i]) % 3 == 0 or int(b[i]) % 5 == 0:
            c = "APPROVED"
        else:
            c = "DENIED"
            break
print(c)