N = int(input())
A = [int(i) for i in input().split()]
t = 0
for i in range(N):
    a = A[i]
    if a%2 == 0:
        if a%3 != 0 and a%5 != 0:
            t += 1
            break

if t == 0:
    print('APPROVED')
else:
    print('DENIED') N = int(input()) N int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i A = [int(i) for i in input().split()] A [int(i) for i in input().split()] t = 0 t 0 for i in range(N):
    a = A[i]
    if a%2 == 0:
        if a%3 != 0 and a%5 != 0:
            t += 1
            break i range(N) range N a = A[i] a A[i] A i if a%2 == 0:
        if a%3 != 0 and a%5 != 0:
            t += 1
            break a%2 == 0 a%2 a 2 0 if a%3 != 0 and a%5 != 0:
            t += 1
            break a%3 != 0 and a%5 != 0 a%3 != 0 a%3 a 3 0 a%5 != 0 a%5 a 5 0 t += 1 t 1 break if t == 0:
    print('APPROVED')
else:
    print('DENIED') t == 0 t 0 print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' A = [int(i) for i in input().split()] [int(i) for i in input().split()] A t = 0 0 t t += 1 1 t N = int(input()) int(input()) N a = A[i] A[i] a
N = int(input())
A = [int(i) for i in input().split()]
t = 0
for i in range(N):
    a = A[i]
    if a%2 == 0:
        if a%3 != 0 and a%5 != 0:
            t += 1
            break

if t == 0:
    print('APPROVED')
else:
    print('DENIED')