n = int(input())
a = list(map(int,input().strip().split()))[:n]
flag = True
for i in range(0,n):
    if a[i]% 2 == 0:
        if a[i]% 3 != 0 and a[i]% 5 != 0:
            flag = False
if  flag==True:
    print("APPROVED")
else :
    print("DENIED") n = int(input()) n int(input()) int input() input a = list(map(int,input().strip().split()))[:n] a list(map(int,input().strip().split()))[:n] (map(int,input().strip().split())) list map(int,input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split :n n flag = True flag True for i in range(0,n):
    if a[i]% 2 == 0:
        if a[i]% 3 != 0 and a[i]% 5 != 0:
            flag = False i range(0,n) range 0 n if a[i]% 2 == 0:
        if a[i]% 3 != 0 and a[i]% 5 != 0:
            flag = False a[i]% 2 == 0 a[i]% 2 a[i] a i 2 0 if a[i]% 3 != 0 and a[i]% 5 != 0:
            flag = False a[i]% 3 != 0 and a[i]% 5 != 0 a[i]% 3 != 0 a[i]% 3 a[i] a i 3 0 a[i]% 5 != 0 a[i]% 5 a[i] a i 5 0 flag = False flag False if  flag==True:
    print("APPROVED")
else :
    print("DENIED") flag==True flag True print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" flag = True True flag n = int(input()) int(input()) n a = list(map(int,input().strip().split()))[:n] list(map(int,input().strip().split()))[:n] a flag = False False flag
n = int(input())
a = list(map(int,input().strip().split()))[:n]
flag = True
for i in range(0,n):
    if a[i]% 2 == 0:
        if a[i]% 3 != 0 and a[i]% 5 != 0:
            flag = False
if  flag==True:
    print("APPROVED")
else :
    print("DENIED")