# ABC155
# B Papers,Please
n = int(input())
a = list(map(int, input().split()))
ans = 0
ant = 0
b = []
for i in range(n):
    if a[i] % 2 == 0:
        ant += 1
        b.append(int(a[i]))
        if a[i] % 3 == 0:
            ans += 1
        elif a[i] % 5 == 0:
            ans += 1

if ant == ans:
    if ant > 0:
        print("APPROVED")
    else:
        print("APPROVED")
else:
    print("DENIED") 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 = 0 ans 0 ant = 0 ant 0 b = [] b [] for i in range(n):
    if a[i] % 2 == 0:
        ant += 1
        b.append(int(a[i]))
        if a[i] % 3 == 0:
            ans += 1
        elif a[i] % 5 == 0:
            ans += 1 i range(n) range n if a[i] % 2 == 0:
        ant += 1
        b.append(int(a[i]))
        if a[i] % 3 == 0:
            ans += 1
        elif a[i] % 5 == 0:
            ans += 1 a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 ant += 1 ant 1 b.append(int(a[i])) b.append b append int(a[i]) int a[i] a i if a[i] % 3 == 0:
            ans += 1
        elif a[i] % 5 == 0:
            ans += 1 a[i] % 3 == 0 a[i] % 3 a[i] a i 3 0 ans += 1 ans 1 elif a[i] % 5 == 0:
            ans += 1 a[i] % 5 == 0 a[i] % 5 a[i] a i 5 0 ans += 1 ans 1 if ant == ans:
    if ant > 0:
        print("APPROVED")
    else:
        print("APPROVED")
else:
    print("DENIED") ant == ans ant ans if ant > 0:
        print("APPROVED")
    else:
        print("APPROVED") ant > 0 ant 0 print("APPROVED") print "APPROVED" print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" ans = 0 0 ans ans += 1 1 ans n = int(input()) int(input()) n ant = 0 0 ant b = [] [] b a = list(map(int, input().split())) list(map(int, input().split())) a ans += 1 1 ans ant += 1 1 ant
# ABC155
# B Papers,Please
n = int(input())
a = list(map(int, input().split()))
ans = 0
ant = 0
b = []
for i in range(n):
    if a[i] % 2 == 0:
        ant += 1
        b.append(int(a[i]))
        if a[i] % 3 == 0:
            ans += 1
        elif a[i] % 5 == 0:
            ans += 1

if ant == ans:
    if ant > 0:
        print("APPROVED")
    else:
        print("APPROVED")
else:
    print("DENIED")
