# 155b

def atc_155b(input_value: str) -> str:
    N = int(input_value[0])
    Ai = [int(ai) for ai in input_value[1].split(" ")]
    for i in range(0, N):
        if Ai[i] % 2 == 0 and Ai[i] % 3 != 0 and Ai[i] % 5 != 0:
            return "DENIED"
    return "APPROVED"

N = input()
Ai = input()
print(atc_155b([N, Ai])) def atc_155b(input_value: str) -> str:
    N = int(input_value[0])
    Ai = [int(ai) for ai in input_value[1].split(" ")]
    for i in range(0, N):
        if Ai[i] % 2 == 0 and Ai[i] % 3 != 0 and Ai[i] % 5 != 0:
            return "DENIED"
    return "APPROVED" atc_155b N = int(input_value[0]) N int(input_value[0]) int input_value[0] input_value 0 int(ai) for ai in input_value[1].split(" ") for ai in input_value[1].split(" ") ai input_value[1].split(" ") [1].split [1] input_value 1 split " " for ai in input_value[1].split(" ") int(ai) int ai Ai = [int(ai) for ai in input_value[1].split(" ")] Ai [int(ai) for ai in input_value[1].split(" ")] for i in range(0, N):
        if Ai[i] % 2 == 0 and Ai[i] % 3 != 0 and Ai[i] % 5 != 0:
            return "DENIED"
     i range(0, N) range 0 N if Ai[i] % 2 == 0 and Ai[i] % 3 != 0 and Ai[i] % 5 != 0:
            return "DENIED"
     Ai[i] % 2 == 0 and Ai[i] % 3 != 0 and Ai[i] % 5 != 0 Ai[i] % 2 == 0 and Ai[i] % 3 != 0 Ai[i] % 2 == 0 Ai[i] % 2 Ai[i] Ai i 2 0 Ai[i] % 3 != 0 Ai[i] % 3 Ai[i] Ai i 3 0 Ai[i] % 5 != 0 Ai[i] % 5 Ai[i] Ai i 5 0 return "DENIED" "DENIED" return "APPROVED" "APPROVED" input_value: str input_value N = input() N input() input Ai = input() Ai input() input print(atc_155b([N, Ai])) print atc_155b([N, Ai]) atc_155b [N, Ai] N Ai Ai = input() input() Ai def atc_155b(input_value: str) -> str:
    N = int(input_value[0])
    Ai = [int(ai) for ai in input_value[1].split(" ")]
    for i in range(0, N):
        if Ai[i] % 2 == 0 and Ai[i] % 3 != 0 and Ai[i] % 5 != 0:
            return "DENIED"
    return "APPROVED" def atc_155b(input_value: str) -> str:
    N = int(input_value[0])
    Ai = [int(ai) for ai in input_value[1].split(" ")]
    for i in range(0, N):
        if Ai[i] % 2 == 0 and Ai[i] % 3 != 0 and Ai[i] % 5 != 0:
            return "DENIED"
    return "APPROVED" atc_155b N = input() input() N
# 155b

def atc_155b(input_value: str) -> str:
    N = int(input_value[0])
    Ai = [int(ai) for ai in input_value[1].split(" ")]
    for i in range(0, N):
        if Ai[i] % 2 == 0 and Ai[i] % 3 != 0 and Ai[i] % 5 != 0:
            return "DENIED"
    return "APPROVED"

N = input()
Ai = input()
print(atc_155b([N, Ai]))
