
def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    x = []
    for i in a:
        if i % 2 == 0:
            if not(i % 3 == 0 or i % 5 == 0):
                print("DENIED")
                return
    print("APPROVED")
    return


if __name__ == "__main__":
    main() def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    x = []
    for i in a:
        if i % 2 == 0:
            if not(i % 3 == 0 or i % 5 == 0):
                print("DENIED")
                return
    print("APPROVED")
    return main n = int(input()) n int(input()) int input() input a = list(map(int, input().split(" "))) a list(map(int, input().split(" "))) list map(int, input().split(" ")) map int input().split(" ") ().split () input split " " x = [] x [] for i in a:
        if i % 2 == 0:
            if not(i % 3 == 0 or i % 5 == 0):
                print("DENIED")
                return
     i a if i % 2 == 0:
            if not(i % 3 == 0 or i % 5 == 0):
                print("DENIED")
                return
     i % 2 == 0 i % 2 i 2 0 if not(i % 3 == 0 or i % 5 == 0):
                print("DENIED")
                return
     not(i % 3 == 0 or i % 5 == 0) i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 print("DENIED") print "DENIED" return print("APPROVED") print "APPROVED" return if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    x = []
    for i in a:
        if i % 2 == 0:
            if not(i % 3 == 0 or i % 5 == 0):
                print("DENIED")
                return
    print("APPROVED")
    return def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    x = []
    for i in a:
        if i % 2 == 0:
            if not(i % 3 == 0 or i % 5 == 0):
                print("DENIED")
                return
    print("APPROVED")
    return main

def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    x = []
    for i in a:
        if i % 2 == 0:
            if not(i % 3 == 0 or i % 5 == 0):
                print("DENIED")
                return
    print("APPROVED")
    return


if __name__ == "__main__":
    main()