def main():
    N = int(input())
    l = list(map(int, input().split()))
    l2 = []
    for i in range(len(l)):
        if l[i] % 2 == 0:
            l2.append(l[i])
    for i in range(len(l2)):
        if not l2[i] % 3 == 0 and not l2[i] % 5 == 0:
            print('DENIED')
            return
    print('APPROVED')

main() def main():
    N = int(input())
    l = list(map(int, input().split()))
    l2 = []
    for i in range(len(l)):
        if l[i] % 2 == 0:
            l2.append(l[i])
    for i in range(len(l2)):
        if not l2[i] % 3 == 0 and not l2[i] % 5 == 0:
            print('DENIED')
            return
    print('APPROVED') main N = int(input()) N int(input()) int input() input l = list(map(int, input().split())) l list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split l2 = [] l2 [] for i in range(len(l)):
        if l[i] % 2 == 0:
            l2.append(l[i])
     i range(len(l)) range len(l) len l if l[i] % 2 == 0:
            l2.append(l[i])
     l[i] % 2 == 0 l[i] % 2 l[i] l i 2 0 l2.append(l[i]) l2.append l2 append l[i] l i for i in range(len(l2)):
        if not l2[i] % 3 == 0 and not l2[i] % 5 == 0:
            print('DENIED')
            return
     i range(len(l2)) range len(l2) len l2 if not l2[i] % 3 == 0 and not l2[i] % 5 == 0:
            print('DENIED')
            return
     not l2[i] % 3 == 0 and not l2[i] % 5 == 0 not l2[i] % 3 == 0 l2[i] % 3 == 0 l2[i] % 3 l2[i] l2 i 3 0 not l2[i] % 5 == 0 l2[i] % 5 == 0 l2[i] % 5 l2[i] l2 i 5 0 print('DENIED') print 'DENIED' return print('APPROVED') print 'APPROVED' main() main def main():
    N = int(input())
    l = list(map(int, input().split()))
    l2 = []
    for i in range(len(l)):
        if l[i] % 2 == 0:
            l2.append(l[i])
    for i in range(len(l2)):
        if not l2[i] % 3 == 0 and not l2[i] % 5 == 0:
            print('DENIED')
            return
    print('APPROVED') def main():
    N = int(input())
    l = list(map(int, input().split()))
    l2 = []
    for i in range(len(l)):
        if l[i] % 2 == 0:
            l2.append(l[i])
    for i in range(len(l2)):
        if not l2[i] % 3 == 0 and not l2[i] % 5 == 0:
            print('DENIED')
            return
    print('APPROVED') main
def main():
    N = int(input())
    l = list(map(int, input().split()))
    l2 = []
    for i in range(len(l)):
        if l[i] % 2 == 0:
            l2.append(l[i])
    for i in range(len(l2)):
        if not l2[i] % 3 == 0 and not l2[i] % 5 == 0:
            print('DENIED')
            return
    print('APPROVED')

main()