N = int(input())
A = list(map(int, input().split()))
is_approved = True
for i in range(N):
    if A[i] % 2 != 0:
        continue
    if A[i] % 3 != 0 and A[i] % 5 != 0:
        is_approved = False
        break
if is_approved:
    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 is_approved = True is_approved True for i in range(N):
    if A[i] % 2 != 0:
        continue
    if A[i] % 3 != 0 and A[i] % 5 != 0:
        is_approved = False
        break i range(N) range N if A[i] % 2 != 0:
        continue
     A[i] % 2 != 0 A[i] % 2 A[i] A i 2 0 continue if A[i] % 3 != 0 and A[i] % 5 != 0:
        is_approved = False
        break 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 is_approved = False is_approved False break if is_approved:
    print("APPROVED")
else:
    print("DENIED") is_approved print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" N = int(input()) int(input()) N is_approved = False False is_approved is_approved = True True is_approved A = list(map(int, input().split())) list(map(int, input().split())) A
N = int(input())
A = list(map(int, input().split()))
is_approved = True
for i in range(N):
    if A[i] % 2 != 0:
        continue
    if A[i] % 3 != 0 and A[i] % 5 != 0:
        is_approved = False
        break
if is_approved:
    print("APPROVED")
else:
    print("DENIED")