N = int(input())
A = list(map(int, input().split()))

answer = 'DENIED'
for i in range(0, N):
    if A[i] % 2 == 0:
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            answer = 'APPROVED'
        else:
            answer = 'DENIED'
            break
    else:
        answer = 'APPROVED'

print(answer) 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 answer = 'DENIED' answer 'DENIED' for i in range(0, N):
    if A[i] % 2 == 0:
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            answer = 'APPROVED'
        else:
            answer = 'DENIED'
            break
    else:
        answer = 'APPROVED' i range(0, N) range 0 N if A[i] % 2 == 0:
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            answer = 'APPROVED'
        else:
            answer = 'DENIED'
            break
    else:
        answer = 'APPROVED' A[i] % 2 == 0 A[i] % 2 A[i] A i 2 0 if A[i] % 3 == 0 or A[i] % 5 == 0:
            answer = 'APPROVED'
        else:
            answer = '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 answer = 'APPROVED' answer 'APPROVED' answer = 'DENIED' answer 'DENIED' break answer = 'APPROVED' answer 'APPROVED' print(answer) print answer N = int(input()) int(input()) N answer = 'DENIED' 'DENIED' answer answer = 'DENIED' 'DENIED' answer answer = 'APPROVED' 'APPROVED' answer A = list(map(int, input().split())) list(map(int, input().split())) A answer = 'APPROVED' 'APPROVED' answer
N = int(input())
A = list(map(int, input().split()))

answer = 'DENIED'
for i in range(0, N):
    if A[i] % 2 == 0:
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            answer = 'APPROVED'
        else:
            answer = 'DENIED'
            break
    else:
        answer = 'APPROVED'

print(answer)