n = int(input())
a = map(int, input().split(" "))

a = [i for i in a if i%2==0]
a2 = [i for i in a if i%3==0 or i%5==0]

print("APPROVED" if a==a2 else "DENIED") n = int(input()) n int(input()) int input() input a = map(int, input().split(" ")) a 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 a = [i for i in a if i%2==0] a [i for i in a if i%2==0] i for i in a if i%3==0 or i%5==0 for i in a if i%3==0 or i%5==0 i a i%3==0 or i%5==0 i%3==0 i%3 i 3 0 i%5==0 i%5 i 5 0 if i%3==0 or i%5==0 i a2 = [i for i in a if i%3==0 or i%5==0] a2 [i for i in a if i%3==0 or i%5==0] print("APPROVED" if a==a2 else "DENIED") print "APPROVED" if a==a2 else "DENIED" a==a2 a a2 "APPROVED" "DENIED" a2 = [i for i in a if i%3==0 or i%5==0] [i for i in a if i%3==0 or i%5==0] a2 a = map(int, input().split(" ")) map(int, input().split(" ")) a a = [i for i in a if i%2==0] [i for i in a if i%2==0] a n = int(input()) int(input()) n
n = int(input())
a = map(int, input().split(" "))

a = [i for i in a if i%2==0]
a2 = [i for i in a if i%3==0 or i%5==0]

print("APPROVED" if a==a2 else "DENIED")