from sys import stdin 

def main():
    n = int(input())
    a = list(map(int, input().split()))
    flag = True 

    for i in range(n):
        if (a[i] % 2 == 0):
            if  a[i] % 3 == 0 or a[i] % 5 == 0:
                flag = True
            else:
                flag = False
                break
    if flag:
        print('APPROVED')
    else:
        print('DENIED')

if __name__ == "__main__":
    main() from sys import stdin def main():
    n = int(input())
    a = list(map(int, input().split()))
    flag = True 

    for i in range(n):
        if (a[i] % 2 == 0):
            if  a[i] % 3 == 0 or a[i] % 5 == 0:
                flag = True
            else:
                flag = False
                break
    if flag:
        print('APPROVED')
    else:
        print('DENIED') 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 flag = True flag True for i in range(n):
        if (a[i] % 2 == 0):
            if  a[i] % 3 == 0 or a[i] % 5 == 0:
                flag = True
            else:
                flag = False
                break
     i range(n) range n if (a[i] % 2 == 0):
            if  a[i] % 3 == 0 or a[i] % 5 == 0:
                flag = True
            else:
                flag = False
                break
     a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 if  a[i] % 3 == 0 or a[i] % 5 == 0:
                flag = True
            else:
                flag = False
                break
     a[i] % 3 == 0 or a[i] % 5 == 0 a[i] % 3 == 0 a[i] % 3 a[i] a i 3 0 a[i] % 5 == 0 a[i] % 5 a[i] a i 5 0 flag = True flag True flag = False flag False break if flag:
        print('APPROVED')
    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 = int(input())
    a = list(map(int, input().split()))
    flag = True 

    for i in range(n):
        if (a[i] % 2 == 0):
            if  a[i] % 3 == 0 or a[i] % 5 == 0:
                flag = True
            else:
                flag = False
                break
    if flag:
        print('APPROVED')
    else:
        print('DENIED') def main():
    n = int(input())
    a = list(map(int, input().split()))
    flag = True 

    for i in range(n):
        if (a[i] % 2 == 0):
            if  a[i] % 3 == 0 or a[i] % 5 == 0:
                flag = True
            else:
                flag = False
                break
    if flag:
        print('APPROVED')
    else:
        print('DENIED') main
from sys import stdin 

def main():
    n = int(input())
    a = list(map(int, input().split()))
    flag = True 

    for i in range(n):
        if (a[i] % 2 == 0):
            if  a[i] % 3 == 0 or a[i] % 5 == 0:
                flag = True
            else:
                flag = False
                break
    if flag:
        print('APPROVED')
    else:
        print('DENIED')

if __name__ == "__main__":
    main()