n = int(input())
al = list(map(int,input().split()))
bl = []
count = 0
#print(al)

for i in range(len(al)):
    if al[i] %2 == 0:
        bl.append(al[i])

#print(bl)

for j in range(len(bl)):
    
    if bl[j] %3 == 0 or bl[j] %5 == 0:
        count += 1
    else:
        pass
    
print(['DENIED','APPROVED'][count == len(bl)]) n = int(input()) n int(input()) int input() input al = list(map(int,input().split())) al list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split bl = [] bl [] count = 0 count 0 for i in range(len(al)):
    if al[i] %2 == 0:
        bl.append(al[i])

#print(bl) i range(len(al)) range len(al) len al if al[i] %2 == 0:
        bl.append(al[i])

#print(bl) al[i] %2 == 0 al[i] %2 al[i] al i 2 0 bl.append(al[i]) bl.append bl append al[i] al i for j in range(len(bl)):
    
    if bl[j] %3 == 0 or bl[j] %5 == 0:
        count += 1
    else:
        pass
     j range(len(bl)) range len(bl) len bl if bl[j] %3 == 0 or bl[j] %5 == 0:
        count += 1
    else:
        pass
     bl[j] %3 == 0 or bl[j] %5 == 0 bl[j] %3 == 0 bl[j] %3 bl[j] bl j 3 0 bl[j] %5 == 0 bl[j] %5 bl[j] bl j 5 0 count += 1 count 1 print(['DENIED','APPROVED'][count == len(bl)]) print ['DENIED','APPROVED'][count == len(bl)] ['DENIED','APPROVED'] 'DENIED' 'APPROVED' count == len(bl) count len(bl) len bl bl = [] [] bl al = list(map(int,input().split())) list(map(int,input().split())) al count = 0 0 count n = int(input()) int(input()) n count += 1 1 count
n = int(input())
al = list(map(int,input().split()))
bl = []
count = 0
#print(al)

for i in range(len(al)):
    if al[i] %2 == 0:
        bl.append(al[i])

#print(bl)

for j in range(len(bl)):
    
    if bl[j] %3 == 0 or bl[j] %5 == 0:
        count += 1
    else:
        pass
    
print(['DENIED','APPROVED'][count == len(bl)])