import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    def judge():
        for x in A:
            if x % 2 == 0:
                if (x % 3 != 0) and (x % 5 != 0):
                    return False
        return True

    if judge():
        print("APPROVED")
    else:
        print("DENIED")


if __name__ == '__main__':
    main() import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 INF = float('INF') INF float('INF') float 'INF' sys.setrecursionlimit(10 ** 5) sys.setrecursionlimit sys setrecursionlimit 10 ** 5 10 5 def main():
    N = int(readline())
    A = list(map(int, readline().split()))

    def judge():
        for x in A:
            if x % 2 == 0:
                if (x % 3 != 0) and (x % 5 != 0):
                    return False
        return True

    if judge():
        print("APPROVED")
    else:
        print("DENIED") main N = int(readline()) N int(readline()) int readline() readline A = list(map(int, readline().split())) A list(map(int, readline().split())) list map(int, readline().split()) map int readline().split() ().split () readline split def judge():
        for x in A:
            if x % 2 == 0:
                if (x % 3 != 0) and (x % 5 != 0):
                    return False
        return True

     judge for x in A:
            if x % 2 == 0:
                if (x % 3 != 0) and (x % 5 != 0):
                    return False
         x A if x % 2 == 0:
                if (x % 3 != 0) and (x % 5 != 0):
                    return False
         x % 2 == 0 x % 2 x 2 0 if (x % 3 != 0) and (x % 5 != 0):
                    return False
         (x % 3 != 0) and (x % 5 != 0) x % 3 != 0 x % 3 x 3 0 x % 5 != 0 x % 5 x 5 0 return False False return True True if judge():
        print("APPROVED")
    else:
        print("DENIED") judge() judge print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main readline = sys.stdin.readline sys.stdin.readline readline MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD INF = float('INF') float('INF') INF def main():
    N = int(readline())
    A = list(map(int, readline().split()))

    def judge():
        for x in A:
            if x % 2 == 0:
                if (x % 3 != 0) and (x % 5 != 0):
                    return False
        return True

    if judge():
        print("APPROVED")
    else:
        print("DENIED") def main():
    N = int(readline())
    A = list(map(int, readline().split()))

    def judge():
        for x in A:
            if x % 2 == 0:
                if (x % 3 != 0) and (x % 5 != 0):
                    return False
        return True

    if judge():
        print("APPROVED")
    else:
        print("DENIED") main
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    def judge():
        for x in A:
            if x % 2 == 0:
                if (x % 3 != 0) and (x % 5 != 0):
                    return False
        return True

    if judge():
        print("APPROVED")
    else:
        print("DENIED")


if __name__ == '__main__':
    main()
