N = int(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") 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(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 a 1 a%3==0 or a%5==0 a%3==0 a%3 a 3 0 a%5==0 a%5 a 5 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(a&1 or (a%3==0 or a%5==0) for a in A) else "DENIED")