S_list = [input() for i in range(2)]
S_list_1 = list(map(int,S_list[1].split()))

for i in S_list_1:   
    if i % 2 == 0 :
        if i % 3 !=0 and i % 5 !=0 :
            result="DENIED"
            break
    else:
        result="APPROVED"        
print(result) input() for i in range(2) for i in range(2) i range(2) range 2 for i in range(2) input() input S_list = [input() for i in range(2)] S_list [input() for i in range(2)] S_list_1 = list(map(int,S_list[1].split())) S_list_1 list(map(int,S_list[1].split())) list map(int,S_list[1].split()) map int S_list[1].split() [1].split [1] S_list 1 split for i in S_list_1:   
    if i % 2 == 0 :
        if i % 3 !=0 and i % 5 !=0 :
            result="DENIED"
            break
    else:
        result="APPROVED"         i S_list_1 if i % 2 == 0 :
        if i % 3 !=0 and i % 5 !=0 :
            result="DENIED"
            break
    else:
        result="APPROVED"         i % 2 == 0 i % 2 i 2 0 if i % 3 !=0 and i % 5 !=0 :
            result="DENIED"
            break
     i % 3 !=0 and i % 5 !=0 i % 3 !=0 i % 3 i 3 0 i % 5 !=0 i % 5 i 5 0 result="DENIED" result "DENIED" break result="APPROVED" result "APPROVED" print(result) print result S_list_1 = list(map(int,S_list[1].split())) list(map(int,S_list[1].split())) S_list_1 result="DENIED" "DENIED" result result="APPROVED" "APPROVED" result S_list = [input() for i in range(2)] [input() for i in range(2)] S_list
S_list = [input() for i in range(2)]
S_list_1 = list(map(int,S_list[1].split()))

for i in S_list_1:   
    if i % 2 == 0 :
        if i % 3 !=0 and i % 5 !=0 :
            result="DENIED"
            break
    else:
        result="APPROVED"        
print(result)