def main():
    n = int(input())
    a_lst = list(map(int, input().split()))
    is_ok = True

    for a in a_lst:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                is_ok = False

    if is_ok:
        ans = "APPROVED"
    else:
        ans = "DENIED"

    print(ans)


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

    for a in a_lst:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                is_ok = False

    if is_ok:
        ans = "APPROVED"
    else:
        ans = "DENIED"

    print(ans) main n = int(input()) n int(input()) int input() input a_lst = list(map(int, input().split())) a_lst list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split is_ok = True is_ok True for a in a_lst:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                is_ok = False

     a a_lst if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                is_ok = False

     a % 2 == 0 a % 2 a 2 0 if a % 3 != 0 and a % 5 != 0:
                is_ok = False

     a % 3 != 0 and a % 5 != 0 a % 3 != 0 a % 3 a 3 0 a % 5 != 0 a % 5 a 5 0 is_ok = False is_ok False if is_ok:
        ans = "APPROVED"
    else:
        ans = "DENIED"

     is_ok ans = "APPROVED" ans "APPROVED" ans = "DENIED" ans "DENIED" print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n = int(input())
    a_lst = list(map(int, input().split()))
    is_ok = True

    for a in a_lst:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                is_ok = False

    if is_ok:
        ans = "APPROVED"
    else:
        ans = "DENIED"

    print(ans) def main():
    n = int(input())
    a_lst = list(map(int, input().split()))
    is_ok = True

    for a in a_lst:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                is_ok = False

    if is_ok:
        ans = "APPROVED"
    else:
        ans = "DENIED"

    print(ans) main
def main():
    n = int(input())
    a_lst = list(map(int, input().split()))
    is_ok = True

    for a in a_lst:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                is_ok = False

    if is_ok:
        ans = "APPROVED"
    else:
        ans = "DENIED"

    print(ans)


if __name__ == "__main__":
    main()
