def main():

    N = int(input())
    A = list(map(int, input().split()))
    even = [v for v in A if v % 2 == 0]
    if all((v % 3 == 0) or (v % 5 == 0) for v in even):
        return "APPROVED"
    return "DENIED"

if __name__ == '__main__':
    print(main()) def main():

    N = int(input())
    A = list(map(int, input().split()))
    even = [v for v in A if v % 2 == 0]
    if all((v % 3 == 0) or (v % 5 == 0) for v in even):
        return "APPROVED"
    return "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 v for v in A if v % 2 == 0 for v in A if v % 2 == 0 v A v % 2 == 0 v % 2 v 2 0 if v % 2 == 0 v even = [v for v in A if v % 2 == 0] even [v for v in A if v % 2 == 0] if all((v % 3 == 0) or (v % 5 == 0) for v in even):
        return "APPROVED"
     all((v % 3 == 0) or (v % 5 == 0) for v in even) all (v % 3 == 0) or (v % 5 == 0) v % 3 == 0 v % 3 v 3 0 v % 5 == 0 v % 5 v 5 0 return "APPROVED" "APPROVED" return "DENIED" "DENIED" if __name__ == '__main__':
    print(main()) __name__ == '__main__' __name__ '__main__' print(main()) print main() main def main():

    N = int(input())
    A = list(map(int, input().split()))
    even = [v for v in A if v % 2 == 0]
    if all((v % 3 == 0) or (v % 5 == 0) for v in even):
        return "APPROVED"
    return "DENIED" def main():

    N = int(input())
    A = list(map(int, input().split()))
    even = [v for v in A if v % 2 == 0]
    if all((v % 3 == 0) or (v % 5 == 0) for v in even):
        return "APPROVED"
    return "DENIED" main
def main():

    N = int(input())
    A = list(map(int, input().split()))
    even = [v for v in A if v % 2 == 0]
    if all((v % 3 == 0) or (v % 5 == 0) for v in even):
        return "APPROVED"
    return "DENIED"

if __name__ == '__main__':
    print(main())
