N = int(input())
A = list(map(int, input().split()))
even = [i for i in A if i % 2 == 0]

if all([i % 3 == 0 or i % 5 == 0 for i in even]) == True:
    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 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 even = [i for i in A if i % 2 == 0] even [i for i in A if i % 2 == 0] if all([i % 3 == 0 or i % 5 == 0 for i in even]) == True:
    print("APPROVED")
else:
    print("DENIED") all([i % 3 == 0 or i % 5 == 0 for i in even]) == True all([i % 3 == 0 or i % 5 == 0 for i in even]) all [i % 3 == 0 or i % 5 == 0 for i in even] True print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" A = list(map(int, input().split())) list(map(int, input().split())) A even = [i for i in A if i % 2 == 0] [i for i in A if i % 2 == 0] even N = int(input()) int(input()) N
N = int(input())
A = list(map(int, input().split()))
even = [i for i in A if i % 2 == 0]

if all([i % 3 == 0 or i % 5 == 0 for i in even]) == True:
    print("APPROVED")
else:
    print("DENIED")