def main():

    N = int(eval(input()))

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

    answer = "APPROVED"

    for a in A:

        if a % 2 == 0:

            if a % 3 == 0 or a % 5 == 0:

                pass

            else:

                answer = "DENIED"

        else:

            pass

    print(answer)



if __name__ == "__main__":

    main()
def main():

    N = int(eval(input()))

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

    answer = "APPROVED"

    for a in A:

        if a % 2 == 0:

            if a % 3 == 0 or a % 5 == 0:

                continue

            else:

                answer = "DENIED"

    print(answer)



if __name__ == "__main__":

    main()
def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    answer = "APPROVED"
    for a in A:
        if a % 2 == 0:
            if a % 3 == 0 or a % 5 == 0:
                pass
            else:
                answer = "DENIED"
        else:
            pass
    print(answer)


if __name__ == "__main__":
    main()

def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    answer = "APPROVED"
    for a in A:
        if a % 2 == 0:
            if a % 3 == 0 or a % 5 == 0:
                continue
            else:
                answer = "DENIED"
    print(answer)


if __name__ == "__main__":
    main()

-                pass +                continue -        else: -            pass