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

cnt = 0
for i in range(N):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            cnt = 1

if cnt == 1:
    print("DENIED")
else:
    print("APPROVED") N = int(input()) N int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a = [int(x) for x in input().split()] a [int(x) for x in input().split()] cnt = 0 cnt 0 for i in range(N):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            cnt = 1 i range(N) range N if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            cnt = 1 a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 if a[i] % 3 != 0 and a[i] % 5 != 0:
            cnt = 1 a[i] % 3 != 0 and 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 cnt = 1 cnt 1 if cnt == 1:
    print("DENIED")
else:
    print("APPROVED") cnt == 1 cnt 1 print("DENIED") print "DENIED" print("APPROVED") print "APPROVED" N = int(input()) int(input()) N cnt = 1 1 cnt a = [int(x) for x in input().split()] [int(x) for x in input().split()] a cnt = 0 0 cnt
N = int(input())
a = [int(x) for x in input().split()]

cnt = 0
for i in range(N):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            cnt = 1

if cnt == 1:
    print("DENIED")
else:
    print("APPROVED")