import sys


def solve(a_list):
    for a in a_list:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                return False
    return True


def main():
    input = sys.stdin.buffer.readline
    _ = int(input())
    a_list = list(map(int, input().split()))
    print("APPROVED" if solve(a_list) else "DENIED")


if __name__ == "__main__":
    main() import sys sys def solve(a_list):
    for a in a_list:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                return False
    return True solve for a in a_list:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                return False
     a a_list if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                return False
     a % 2 == 0 a % 2 a 2 0 if a % 3 != 0 and a % 5 != 0:
                return False
     a % 3 != 0 and a % 5 != 0 a % 3 != 0 a % 3 a 3 0 a % 5 != 0 a % 5 a 5 0 return False False return True True a_list a_list def main():
    input = sys.stdin.buffer.readline
    _ = int(input())
    a_list = list(map(int, input().split()))
    print("APPROVED" if solve(a_list) else "DENIED") main input = sys.stdin.buffer.readline input sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline _ = int(input()) _ int(input()) int input() input a_list = list(map(int, input().split())) a_list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split print("APPROVED" if solve(a_list) else "DENIED") print "APPROVED" if solve(a_list) else "DENIED" solve(a_list) solve a_list "APPROVED" "DENIED" if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def solve(a_list):
    for a in a_list:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                return False
    return True def solve(a_list):
    for a in a_list:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                return False
    return True solve def main():
    input = sys.stdin.buffer.readline
    _ = int(input())
    a_list = list(map(int, input().split()))
    print("APPROVED" if solve(a_list) else "DENIED") def main():
    input = sys.stdin.buffer.readline
    _ = int(input())
    a_list = list(map(int, input().split()))
    print("APPROVED" if solve(a_list) else "DENIED") main
import sys


def solve(a_list):
    for a in a_list:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                return False
    return True


def main():
    input = sys.stdin.buffer.readline
    _ = int(input())
    a_list = list(map(int, input().split()))
    print("APPROVED" if solve(a_list) else "DENIED")


if __name__ == "__main__":
    main()
