N = int(input())
data = list(map(int,input().split()))
sw1 = 0
sw2 = 0
for i in range(0,len(data)):
    if data[i] % 2 == 0:
        sw1 += 1
        if data[i] % 3 == 0 or data[i] % 5 == 0:
            sw2 += 1

if sw1 >= 0 and sw1 == sw2:
    print("APPROVED")
else:
    print("DENIED") N = int(input()) N int(input()) int input() input data = list(map(int,input().split())) data list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split sw1 = 0 sw1 0 sw2 = 0 sw2 0 for i in range(0,len(data)):
    if data[i] % 2 == 0:
        sw1 += 1
        if data[i] % 3 == 0 or data[i] % 5 == 0:
            sw2 += 1 i range(0,len(data)) range 0 len(data) len data if data[i] % 2 == 0:
        sw1 += 1
        if data[i] % 3 == 0 or data[i] % 5 == 0:
            sw2 += 1 data[i] % 2 == 0 data[i] % 2 data[i] data i 2 0 sw1 += 1 sw1 1 if data[i] % 3 == 0 or data[i] % 5 == 0:
            sw2 += 1 data[i] % 3 == 0 or data[i] % 5 == 0 data[i] % 3 == 0 data[i] % 3 data[i] data i 3 0 data[i] % 5 == 0 data[i] % 5 data[i] data i 5 0 sw2 += 1 sw2 1 if sw1 >= 0 and sw1 == sw2:
    print("APPROVED")
else:
    print("DENIED") sw1 >= 0 and sw1 == sw2 sw1 >= 0 sw1 0 sw1 == sw2 sw1 sw2 print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" N = int(input()) int(input()) N sw2 = 0 0 sw2 sw1 = 0 0 sw1 sw1 += 1 1 sw1 sw2 += 1 1 sw2 data = list(map(int,input().split())) list(map(int,input().split())) data
N = int(input())
data = list(map(int,input().split()))
sw1 = 0
sw2 = 0
for i in range(0,len(data)):
    if data[i] % 2 == 0:
        sw1 += 1
        if data[i] % 3 == 0 or data[i] % 5 == 0:
            sw2 += 1

if sw1 >= 0 and sw1 == sw2:
    print("APPROVED")
else:
    print("DENIED")