N = int(input())
A = list(map(int, input().split()))
a = True
for x in A:
	if x % 2 == 0:
		if x % 3 != 0 and x % 5 != 0:
			a = False
			break
if a:
	print('APPROVED')
else:
	print('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 a = True a True for x in A:
	if x % 2 == 0:
		if x % 3 != 0 and x % 5 != 0:
			a = False
			break x A if x % 2 == 0:
		if x % 3 != 0 and x % 5 != 0:
			a = False
			break x % 2 == 0 x % 2 x 2 0 if x % 3 != 0 and x % 5 != 0:
			a = False
			break x % 3 != 0 and x % 5 != 0 x % 3 != 0 x % 3 x 3 0 x % 5 != 0 x % 5 x 5 0 a = False a False break if a:
	print('APPROVED')
else:
	print('DENIED') a print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' a = True True a N = int(input()) int(input()) N A = list(map(int, input().split())) list(map(int, input().split())) A a = False False a
N = int(input())
A = list(map(int, input().split()))
a = True
for x in A:
	if x % 2 == 0:
		if x % 3 != 0 and x % 5 != 0:
			a = False
			break
if a:
	print('APPROVED')
else:
	print('DENIED')
