a = int(input())
b = list(map(int, input().split()[:a]))
my_list = []
score = 0
for i in b:
    if i%2==0:
        my_list.append(i)
for i in my_list:
    if i%3==0 or i%5==0:
        score += 1
if len(my_list) == score:
    print("APPROVED")
else:
    print("DENIED") a = int(input()) a int(input()) int input() input b = list(map(int, input().split()[:a])) b list(map(int, input().split()[:a])) list map(int, input().split()[:a]) map int input().split()[:a] ().split() ().split () input split :a a my_list = [] my_list [] score = 0 score 0 for i in b:
    if i%2==0:
        my_list.append(i) i b if i%2==0:
        my_list.append(i) i%2==0 i%2 i 2 0 my_list.append(i) my_list.append my_list append i for i in my_list:
    if i%3==0 or i%5==0:
        score += 1 i my_list if i%3==0 or i%5==0:
        score += 1 i%3==0 or i%5==0 i%3==0 i%3 i 3 0 i%5==0 i%5 i 5 0 score += 1 score 1 if len(my_list) == score:
    print("APPROVED")
else:
    print("DENIED") len(my_list) == score len(my_list) len my_list score print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" score = 0 0 score a = int(input()) int(input()) a score += 1 1 score b = list(map(int, input().split()[:a])) list(map(int, input().split()[:a])) b my_list = [] [] my_list
a = int(input())
b = list(map(int, input().split()[:a]))
my_list = []
score = 0
for i in b:
    if i%2==0:
        my_list.append(i)
for i in my_list:
    if i%3==0 or i%5==0:
        score += 1
if len(my_list) == score:
    print("APPROVED")
else:
    print("DENIED")