N = int(input())
A = list(map(int, input().split()))
B = [i for i in A if i % 2 == 0]
o = 'APPROVED'
for i in B:
	if i % 3 != 0 and i % 5 != 0:
		o = 'DENIED'
		break
print(o) 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 i for i in A if i % 2 == 0 for i in A if i % 2 == 0 i A i % 2 == 0 i % 2 i 2 0 if i % 2 == 0 i B = [i for i in A if i % 2 == 0] B [i for i in A if i % 2 == 0] o = 'APPROVED' o 'APPROVED' for i in B:
	if i % 3 != 0 and i % 5 != 0:
		o = 'DENIED'
		break i B if i % 3 != 0 and i % 5 != 0:
		o = 'DENIED'
		break i % 3 != 0 and i % 5 != 0 i % 3 != 0 i % 3 i 3 0 i % 5 != 0 i % 5 i 5 0 o = 'DENIED' o 'DENIED' break print(o) print o N = int(input()) int(input()) N A = list(map(int, input().split())) list(map(int, input().split())) A B = [i for i in A if i % 2 == 0] [i for i in A if i % 2 == 0] B o = 'APPROVED' 'APPROVED' o o = 'DENIED' 'DENIED' o
N = int(input())
A = list(map(int, input().split()))
B = [i for i in A if i % 2 == 0]
o = 'APPROVED'
for i in B:
	if i % 3 != 0 and i % 5 != 0:
		o = 'DENIED'
		break
print(o)