input()
*l,=map(int,input().split())
print( len(set([1 for i in l if i%2==0 and (i%3!=0 and i%5!=0)]))*"DENIED" or 'APPROVED')  input() input *l,=map(int,input().split()) *l l map(int,input().split()) map int input().split() ().split () input split 1 for i in l if i%2==0 and (i%3!=0 and i%5!=0) for i in l if i%2==0 and (i%3!=0 and i%5!=0) i l i%2==0 and (i%3!=0 and i%5!=0) i%2==0 i%2 i 2 0 i%3!=0 and i%5!=0 i%3!=0 i%3 i 3 0 i%5!=0 i%5 i 5 0 if i%2==0 and (i%3!=0 and i%5!=0) 1 print( len(set([1 for i in l if i%2==0 and (i%3!=0 and i%5!=0)]))*"DENIED" or 'APPROVED') print len(set([1 for i in l if i%2==0 and (i%3!=0 and i%5!=0)]))*"DENIED" or 'APPROVED' len(set([1 for i in l if i%2==0 and (i%3!=0 and i%5!=0)]))*"DENIED" len(set([1 for i in l if i%2==0 and (i%3!=0 and i%5!=0)])) len set([1 for i in l if i%2==0 and (i%3!=0 and i%5!=0)]) set [1 for i in l if i%2==0 and (i%3!=0 and i%5!=0)] "DENIED" 'APPROVED'
input()
*l,=map(int,input().split())
print( len(set([1 for i in l if i%2==0 and (i%3!=0 and i%5!=0)]))*"DENIED" or 'APPROVED') 