#!/usr/bin/env python3
def main():
    _ = int(input())
    A = [int(x) for x in input().split()]

    flag = True
    for a in A:
        if a % 2 == 0:
            if a % 3 == 0 or a % 5 == 0:
                pass
            else:
                flag = False
                break
    if flag:
        print('APPROVED')
    else:
        print('DENIED')


if __name__ == '__main__':
    main() def main():
    _ = int(input())
    A = [int(x) for x in input().split()]

    flag = True
    for a in A:
        if a % 2 == 0:
            if a % 3 == 0 or a % 5 == 0:
                pass
            else:
                flag = False
                break
    if flag:
        print('APPROVED')
    else:
        print('DENIED') main _ = int(input()) _ 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:
            if a % 3 == 0 or a % 5 == 0:
                pass
            else:
                flag = False
                break
     a A if a % 2 == 0:
            if a % 3 == 0 or a % 5 == 0:
                pass
            else:
                flag = False
                break
     a % 2 == 0 a % 2 a 2 0 if a % 3 == 0 or a % 5 == 0:
                pass
            else:
                flag = False
                break
     a % 3 == 0 or a % 5 == 0 a % 3 == 0 a % 3 a 3 0 a % 5 == 0 a % 5 a 5 0 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():
    _ = int(input())
    A = [int(x) for x in input().split()]

    flag = True
    for a in A:
        if a % 2 == 0:
            if a % 3 == 0 or a % 5 == 0:
                pass
            else:
                flag = False
                break
    if flag:
        print('APPROVED')
    else:
        print('DENIED') def main():
    _ = int(input())
    A = [int(x) for x in input().split()]

    flag = True
    for a in A:
        if a % 2 == 0:
            if a % 3 == 0 or a % 5 == 0:
                pass
            else:
                flag = False
                break
    if flag:
        print('APPROVED')
    else:
        print('DENIED') main
#!/usr/bin/env python3
def main():
    _ = int(input())
    A = [int(x) for x in input().split()]

    flag = True
    for a in A:
        if a % 2 == 0:
            if a % 3 == 0 or a % 5 == 0:
                pass
            else:
                flag = False
                break
    if flag:
        print('APPROVED')
    else:
        print('DENIED')


if __name__ == '__main__':
    main()
