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