n = int(input())
al = list(map(int, input().split()))

flg = True
for a in al:
    if a%2 == 0:
        if a%3 == 0 or a%5 == 0:
            continue
        else:
            flg = False
            break

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

flg = True
for a in al:
    if a%2 == 0:
        if a%3 == 0 or a%5 == 0:
            continue
        else:
            flg = False
            break

if flg:
    print('APPROVED')
else:
    print('DENIED')