def main():
    N = input()
    A = [v for v in map(int, input().split()) if v % 2 == 0]
    for a in A:
        if a % 3 != 0 and a % 5 != 0:
            print("DENIED")
            exit()
    print("APPROVED")


if __name__ == '__main__':
    main() def main():
    N = input()
    A = [v for v in map(int, input().split()) if v % 2 == 0]
    for a in A:
        if a % 3 != 0 and a % 5 != 0:
            print("DENIED")
            exit()
    print("APPROVED") main N = input() N input() input v for v in map(int, input().split()) if v % 2 == 0 for v in map(int, input().split()) if v % 2 == 0 v map(int, input().split()) map int input().split() ().split () input split v % 2 == 0 v % 2 v 2 0 if v % 2 == 0 v A = [v for v in map(int, input().split()) if v % 2 == 0] A [v for v in map(int, input().split()) if v % 2 == 0] for a in A:
        if a % 3 != 0 and a % 5 != 0:
            print("DENIED")
            exit()
     a A if a % 3 != 0 and a % 5 != 0:
            print("DENIED")
            exit()
     a % 3 != 0 and a % 5 != 0 a % 3 != 0 a % 3 a 3 0 a % 5 != 0 a % 5 a 5 0 print("DENIED") print "DENIED" exit() exit print("APPROVED") print "APPROVED" if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N = input()
    A = [v for v in map(int, input().split()) if v % 2 == 0]
    for a in A:
        if a % 3 != 0 and a % 5 != 0:
            print("DENIED")
            exit()
    print("APPROVED") def main():
    N = input()
    A = [v for v in map(int, input().split()) if v % 2 == 0]
    for a in A:
        if a % 3 != 0 and a % 5 != 0:
            print("DENIED")
            exit()
    print("APPROVED") main
def main():
    N = input()
    A = [v for v in map(int, input().split()) if v % 2 == 0]
    for a in A:
        if a % 3 != 0 and a % 5 != 0:
            print("DENIED")
            exit()
    print("APPROVED")


if __name__ == '__main__':
    main()
