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

    flag = True 

    for n in range(N):
        if A[n] % 2 == 0 and A[n] % 3 != 0 and A[n] % 5 != 0:
            flag = False
    
    print('APPROVED') if flag else print('DENIED') 


if __name__ == '__main__':
    main()
 def main():
    N, A = int(input()), list(map(int, input().split()))

    flag = True 

    for n in range(N):
        if A[n] % 2 == 0 and A[n] % 3 != 0 and A[n] % 5 != 0:
            flag = False
    
    print('APPROVED') if flag else print('DENIED')  main N, A = int(input()), list(map(int, input().split())) N int(input()) int input() input A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split flag = True flag True for n in range(N):
        if A[n] % 2 == 0 and A[n] % 3 != 0 and A[n] % 5 != 0:
            flag = False
    
     n range(N) range N if A[n] % 2 == 0 and A[n] % 3 != 0 and A[n] % 5 != 0:
            flag = False
    
     A[n] % 2 == 0 and A[n] % 3 != 0 and A[n] % 5 != 0 A[n] % 2 == 0 and A[n] % 3 != 0 A[n] % 2 == 0 A[n] % 2 A[n] A n 2 0 A[n] % 3 != 0 A[n] % 3 A[n] A n 3 0 A[n] % 5 != 0 A[n] % 5 A[n] A n 5 0 flag = False flag False print('APPROVED') if flag else print('DENIED') flag print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N, A = int(input()), list(map(int, input().split()))

    flag = True 

    for n in range(N):
        if A[n] % 2 == 0 and A[n] % 3 != 0 and A[n] % 5 != 0:
            flag = False
    
    print('APPROVED') if flag else print('DENIED')  def main():
    N, A = int(input()), list(map(int, input().split()))

    flag = True 

    for n in range(N):
        if A[n] % 2 == 0 and A[n] % 3 != 0 and A[n] % 5 != 0:
            flag = False
    
    print('APPROVED') if flag else print('DENIED')  main
def main():
    N, A = int(input()), list(map(int, input().split()))

    flag = True 

    for n in range(N):
        if A[n] % 2 == 0 and A[n] % 3 != 0 and A[n] % 5 != 0:
            flag = False
    
    print('APPROVED') if flag else print('DENIED') 


if __name__ == '__main__':
    main()

