def main():
    N=int(input())
    A=list(map(int, input().split()))
    even=[i for i in A if i % 2 == 0]
    for i in even:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            print('DENIED')
            return
    print('APPROVED')
main() def main():
    N=int(input())
    A=list(map(int, input().split()))
    even=[i for i in A if i % 2 == 0]
    for i in even:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            print('DENIED')
            return
    print('APPROVED') main 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 i for i in A if i % 2 == 0 for i in A if i % 2 == 0 i A i % 2 == 0 i % 2 i 2 0 if i % 2 == 0 i even=[i for i in A if i % 2 == 0] even [i for i in A if i % 2 == 0] for i in even:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            print('DENIED')
            return
     i even if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            print('DENIED')
            return
     i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 print('DENIED') print 'DENIED' return print('APPROVED') print 'APPROVED' main() main def main():
    N=int(input())
    A=list(map(int, input().split()))
    even=[i for i in A if i % 2 == 0]
    for i in even:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            print('DENIED')
            return
    print('APPROVED') def main():
    N=int(input())
    A=list(map(int, input().split()))
    even=[i for i in A if i % 2 == 0]
    for i in even:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            print('DENIED')
            return
    print('APPROVED') main
def main():
    N=int(input())
    A=list(map(int, input().split()))
    even=[i for i in A if i % 2 == 0]
    for i in even:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            print('DENIED')
            return
    print('APPROVED')
main()