N = input()
A_ls = map(int, input().split(' '))
A_ls = [i for i in A_ls if i % 2 == 0]
ls = [i for i in A_ls if i % 3 == 0 or i % 5 == 0]
if len(A_ls) == len(ls):
    print('APPROVED')
else:
    print('DENIED') N = input() N input() input A_ls = map(int, input().split(' ')) A_ls map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' i for i in A_ls if i % 2 == 0 for i in A_ls if i % 2 == 0 i A_ls i % 2 == 0 i % 2 i 2 0 if i % 2 == 0 i A_ls = [i for i in A_ls if i % 2 == 0] A_ls [i for i in A_ls if i % 2 == 0] i for i in A_ls if i % 3 == 0 or i % 5 == 0 for i in A_ls if i % 3 == 0 or i % 5 == 0 i A_ls i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 if i % 3 == 0 or i % 5 == 0 i ls = [i for i in A_ls if i % 3 == 0 or i % 5 == 0] ls [i for i in A_ls if i % 3 == 0 or i % 5 == 0] if len(A_ls) == len(ls):
    print('APPROVED')
else:
    print('DENIED') len(A_ls) == len(ls) len(A_ls) len A_ls len(ls) len ls print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' A_ls = map(int, input().split(' ')) map(int, input().split(' ')) A_ls N = input() input() N A_ls = [i for i in A_ls if i % 2 == 0] [i for i in A_ls if i % 2 == 0] A_ls ls = [i for i in A_ls if i % 3 == 0 or i % 5 == 0] [i for i in A_ls if i % 3 == 0 or i % 5 == 0] ls
N = input()
A_ls = map(int, input().split(' '))
A_ls = [i for i in A_ls if i % 2 == 0]
ls = [i for i in A_ls if i % 3 == 0 or i % 5 == 0]
if len(A_ls) == len(ls):
    print('APPROVED')
else:
    print('DENIED')