# https://atcoder.jp/contests/abc155/tasks/abc155_b

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

def main(A):
    for a in A:
        if a%2 ==1:
            continue
        if (a%3 != 0) and (a%5 != 0):
            return "DENIED"
    return "APPROVED"

if __name__ == "__main__":
    print(main(A)) 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 def main(A):
    for a in A:
        if a%2 ==1:
            continue
        if (a%3 != 0) and (a%5 != 0):
            return "DENIED"
    return "APPROVED" main for a in A:
        if a%2 ==1:
            continue
        if (a%3 != 0) and (a%5 != 0):
            return "DENIED"
     a A if a%2 ==1:
            continue
         a%2 ==1 a%2 a 2 1 continue if (a%3 != 0) and (a%5 != 0):
            return "DENIED"
     (a%3 != 0) and (a%5 != 0) a%3 != 0 a%3 a 3 0 a%5 != 0 a%5 a 5 0 return "DENIED" "DENIED" return "APPROVED" "APPROVED" A A if __name__ == "__main__":
    print(main(A)) __name__ == "__main__" __name__ "__main__" print(main(A)) print main(A) main A N = int(input()) int(input()) N def main(A):
    for a in A:
        if a%2 ==1:
            continue
        if (a%3 != 0) and (a%5 != 0):
            return "DENIED"
    return "APPROVED" def main(A):
    for a in A:
        if a%2 ==1:
            continue
        if (a%3 != 0) and (a%5 != 0):
            return "DENIED"
    return "APPROVED" main A = list(map(int,input().split())) list(map(int,input().split())) A
# https://atcoder.jp/contests/abc155/tasks/abc155_b

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

def main(A):
    for a in A:
        if a%2 ==1:
            continue
        if (a%3 != 0) and (a%5 != 0):
            return "DENIED"
    return "APPROVED"

if __name__ == "__main__":
    print(main(A))