N = int(input())
A = list(map(lambda x: int(x), input().split(" ")))
B = list(filter(lambda y: y % 2 == 0 and y % 3 != 0 and y % 5 != 0, A))
print("DENIED") if len(B) > 0 else print("APPROVED") N = int(input()) N int(input()) int input() input A = list(map(lambda x: int(x), input().split(" "))) A list(map(lambda x: int(x), input().split(" "))) list map(lambda x: int(x), input().split(" ")) map lambda x: int(x) int(x) int x x input().split(" ") ().split () input split " " B = list(filter(lambda y: y % 2 == 0 and y % 3 != 0 and y % 5 != 0, A)) B list(filter(lambda y: y % 2 == 0 and y % 3 != 0 and y % 5 != 0, A)) list filter(lambda y: y % 2 == 0 and y % 3 != 0 and y % 5 != 0, A) filter lambda y: y % 2 == 0 and y % 3 != 0 and y % 5 != 0 y % 2 == 0 and y % 3 != 0 and y % 5 != 0 y % 2 == 0 and y % 3 != 0 y % 2 == 0 y % 2 y 2 0 y % 3 != 0 y % 3 y 3 0 y % 5 != 0 y % 5 y 5 0 y A print("DENIED") if len(B) > 0 else print("APPROVED") len(B) > 0 len(B) len B 0 print("DENIED") print "DENIED" print("APPROVED") print "APPROVED" N = int(input()) int(input()) N B = list(filter(lambda y: y % 2 == 0 and y % 3 != 0 and y % 5 != 0, A)) list(filter(lambda y: y % 2 == 0 and y % 3 != 0 and y % 5 != 0, A)) B A = list(map(lambda x: int(x), input().split(" "))) list(map(lambda x: int(x), input().split(" "))) A
N = int(input())
A = list(map(lambda x: int(x), input().split(" ")))
B = list(filter(lambda y: y % 2 == 0 and y % 3 != 0 and y % 5 != 0, A))
print("DENIED") if len(B) > 0 else print("APPROVED")
