input()
A=list(map(int,input().split()))
print("APPROVED" if all(a&1 or a%3==0 or a%5==0 for a in A) else "DENIED") 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 print("APPROVED" if all(a&1 or a%3==0 or a%5==0 for a in A) else "DENIED") print "APPROVED" if all(a&1 or a%3==0 or a%5==0 for a in A) else "DENIED" all(a&1 or a%3==0 or a%5==0 for a in A) all a&1 or a%3==0 or a%5==0 a&1 or a%3==0 a&1 a 1 a%3==0 a%3 a 3 0 a%5==0 a%5 a 5 0 "APPROVED" "DENIED" A=list(map(int,input().split())) list(map(int,input().split())) A
input()
A=list(map(int,input().split()))
print("APPROVED" if all(a&1 or a%3==0 or a%5==0 for a in A) else "DENIED")