def solve():
    N = int(input())
    A = [int(i) for i in input().split()]
    is_approved = True
    for num in A:
        if num % 2 == 0:
            if not (num % 3 == 0 or num % 5 == 0):
                is_approved = False
    if is_approved:
        print("APPROVED")
    else:
        print("DENIED")

if __name__ == "__main__":
    solve() def solve():
    N = int(input())
    A = [int(i) for i in input().split()]
    is_approved = True
    for num in A:
        if num % 2 == 0:
            if not (num % 3 == 0 or num % 5 == 0):
                is_approved = False
    if is_approved:
        print("APPROVED")
    else:
        print("DENIED") solve N = int(input()) N int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i A = [int(i) for i in input().split()] A [int(i) for i in input().split()] is_approved = True is_approved True for num in A:
        if num % 2 == 0:
            if not (num % 3 == 0 or num % 5 == 0):
                is_approved = False
     num A if num % 2 == 0:
            if not (num % 3 == 0 or num % 5 == 0):
                is_approved = False
     num % 2 == 0 num % 2 num 2 0 if not (num % 3 == 0 or num % 5 == 0):
                is_approved = False
     not (num % 3 == 0 or num % 5 == 0) num % 3 == 0 or num % 5 == 0 num % 3 == 0 num % 3 num 3 0 num % 5 == 0 num % 5 num 5 0 is_approved = False is_approved False if is_approved:
        print("APPROVED")
    else:
        print("DENIED") is_approved print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" if __name__ == "__main__":
    solve() __name__ == "__main__" __name__ "__main__" solve() solve def solve():
    N = int(input())
    A = [int(i) for i in input().split()]
    is_approved = True
    for num in A:
        if num % 2 == 0:
            if not (num % 3 == 0 or num % 5 == 0):
                is_approved = False
    if is_approved:
        print("APPROVED")
    else:
        print("DENIED") def solve():
    N = int(input())
    A = [int(i) for i in input().split()]
    is_approved = True
    for num in A:
        if num % 2 == 0:
            if not (num % 3 == 0 or num % 5 == 0):
                is_approved = False
    if is_approved:
        print("APPROVED")
    else:
        print("DENIED") solve
def solve():
    N = int(input())
    A = [int(i) for i in input().split()]
    is_approved = True
    for num in A:
        if num % 2 == 0:
            if not (num % 3 == 0 or num % 5 == 0):
                is_approved = False
    if is_approved:
        print("APPROVED")
    else:
        print("DENIED")

if __name__ == "__main__":
    solve()