N = int(input())


num = list(map(int, input().split()))


ok_list = []
ng_list = []

for i in num:
    if i % 2 == 1:
        ok_list.append(i)

    elif i % 3 == 0 or i % 5 == 0:
        ok_list.append(i)

    else:
        ng_list.append(i)

if not ng_list:
    print("APPROVED")
else:
    print("DENIED") N = int(input()) N int(input()) int input() input num = list(map(int, input().split())) num list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ok_list = [] ok_list [] ng_list = [] ng_list [] for i in num:
    if i % 2 == 1:
        ok_list.append(i)

    elif i % 3 == 0 or i % 5 == 0:
        ok_list.append(i)

    else:
        ng_list.append(i) i num if i % 2 == 1:
        ok_list.append(i)

    elif i % 3 == 0 or i % 5 == 0:
        ok_list.append(i)

    else:
        ng_list.append(i) i % 2 == 1 i % 2 i 2 1 ok_list.append(i) ok_list.append ok_list append i elif i % 3 == 0 or i % 5 == 0:
        ok_list.append(i)

     i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 ok_list.append(i) ok_list.append ok_list append i ng_list.append(i) ng_list.append ng_list append i if not ng_list:
    print("APPROVED")
else:
    print("DENIED") not ng_list ng_list print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" N = int(input()) int(input()) N ok_list = [] [] ok_list num = list(map(int, input().split())) list(map(int, input().split())) num ng_list = [] [] ng_list
N = int(input())


num = list(map(int, input().split()))


ok_list = []
ng_list = []

for i in num:
    if i % 2 == 1:
        ok_list.append(i)

    elif i % 3 == 0 or i % 5 == 0:
        ok_list.append(i)

    else:
        ng_list.append(i)

if not ng_list:
    print("APPROVED")
else:
    print("DENIED")