def main():
    n = int(input())
    A = [int(x) for x in input().split()]
    flag = True
    for a in A:
        if a % 2 != 0:
            continue
        else:
            if a % 3 != 0 and a % 5 != 0:
                flag = False
    if flag:
        print('APPROVED')
    else:
        print('DENIED')

if __name__ == '__main__':
    main() def main():
    n = int(input())
    A = [int(x) for x in input().split()]
    flag = True
    for a in A:
        if a % 2 != 0:
            continue
        else:
            if a % 3 != 0 and a % 5 != 0:
                flag = False
    if flag:
        print('APPROVED')
    else:
        print('DENIED') main n = int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x A = [int(x) for x in input().split()] A [int(x) for x in input().split()] flag = True flag True for a in A:
        if a % 2 != 0:
            continue
        else:
            if a % 3 != 0 and a % 5 != 0:
                flag = False
     a A if a % 2 != 0:
            continue
        else:
            if a % 3 != 0 and a % 5 != 0:
                flag = False
     a % 2 != 0 a % 2 a 2 0 continue if a % 3 != 0 and a % 5 != 0:
                flag = False
     a % 3 != 0 and a % 5 != 0 a % 3 != 0 a % 3 a 3 0 a % 5 != 0 a % 5 a 5 0 flag = False flag False 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 = [int(x) for x in input().split()]
    flag = True
    for a in A:
        if a % 2 != 0:
            continue
        else:
            if a % 3 != 0 and a % 5 != 0:
                flag = False
    if flag:
        print('APPROVED')
    else:
        print('DENIED') def main():
    n = int(input())
    A = [int(x) for x in input().split()]
    flag = True
    for a in A:
        if a % 2 != 0:
            continue
        else:
            if a % 3 != 0 and a % 5 != 0:
                flag = False
    if flag:
        print('APPROVED')
    else:
        print('DENIED') main
def main():
    n = int(input())
    A = [int(x) for x in input().split()]
    flag = True
    for a in A:
        if a % 2 != 0:
            continue
        else:
            if a % 3 != 0 and a % 5 != 0:
                flag = False
    if flag:
        print('APPROVED')
    else:
        print('DENIED')

if __name__ == '__main__':
    main()