def main():
    N = int(input())
    A = list(map(int, input().split()))

    for i in A:
        if i % 2 == 0:
            if i % 3 != 0 and i % 5 != 0:
                return ("DENIED")
    return ("APPROVED")

print(main()) def main():
    N = int(input())
    A = list(map(int, input().split()))

    for i in A:
        if i % 2 == 0:
            if i % 3 != 0 and i % 5 != 0:
                return ("DENIED")
    return ("APPROVED") 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 i in A:
        if i % 2 == 0:
            if i % 3 != 0 and i % 5 != 0:
                return ("DENIED")
     i A if i % 2 == 0:
            if i % 3 != 0 and i % 5 != 0:
                return ("DENIED")
     i % 2 == 0 i % 2 i 2 0 if i % 3 != 0 and i % 5 != 0:
                return ("DENIED")
     i % 3 != 0 and i % 5 != 0 i % 3 != 0 i % 3 i 3 0 i % 5 != 0 i % 5 i 5 0 return ("DENIED") "DENIED" return ("APPROVED") "APPROVED" print(main()) print main() main def main():
    N = int(input())
    A = list(map(int, input().split()))

    for i in A:
        if i % 2 == 0:
            if i % 3 != 0 and i % 5 != 0:
                return ("DENIED")
    return ("APPROVED") def main():
    N = int(input())
    A = list(map(int, input().split()))

    for i in A:
        if i % 2 == 0:
            if i % 3 != 0 and i % 5 != 0:
                return ("DENIED")
    return ("APPROVED") main
def main():
    N = int(input())
    A = list(map(int, input().split()))

    for i in A:
        if i % 2 == 0:
            if i % 3 != 0 and i % 5 != 0:
                return ("DENIED")
    return ("APPROVED")

print(main())