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