def main():
    n = int(input())
    a = list(map(int, input().split()))

    for num in a:
        if num % 2 == 0:
            if num % 3 != 0 and num % 5 != 0:
                break
    else:
        print("APPROVED")
        return
    print("DENIED")


if __name__ == "__main__":
    main()
 def main():
    n = int(input())
    a = list(map(int, input().split()))

    for num in a:
        if num % 2 == 0:
            if num % 3 != 0 and num % 5 != 0:
                break
    else:
        print("APPROVED")
        return
    print("DENIED") 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 for num in a:
        if num % 2 == 0:
            if num % 3 != 0 and num % 5 != 0:
                break
    else:
        print("APPROVED")
        return
     num a if num % 2 == 0:
            if num % 3 != 0 and num % 5 != 0:
                break
     num % 2 == 0 num % 2 num 2 0 if num % 3 != 0 and num % 5 != 0:
                break
     num % 3 != 0 and num % 5 != 0 num % 3 != 0 num % 3 num 3 0 num % 5 != 0 num % 5 num 5 0 break print("APPROVED") print "APPROVED" return print("DENIED") print "DENIED" if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n = int(input())
    a = list(map(int, input().split()))

    for num in a:
        if num % 2 == 0:
            if num % 3 != 0 and num % 5 != 0:
                break
    else:
        print("APPROVED")
        return
    print("DENIED") def main():
    n = int(input())
    a = list(map(int, input().split()))

    for num in a:
        if num % 2 == 0:
            if num % 3 != 0 and num % 5 != 0:
                break
    else:
        print("APPROVED")
        return
    print("DENIED") main
def main():
    n = int(input())
    a = list(map(int, input().split()))

    for num in a:
        if num % 2 == 0:
            if num % 3 != 0 and num % 5 != 0:
                break
    else:
        print("APPROVED")
        return
    print("DENIED")


if __name__ == "__main__":
    main()

