N=int(input())

A=list(map(int,input().split()))

flg=True
for i in A:
    if i%2==0:
        if i%3==0 or i%5==0:
            pass
        else:
            flg=False
            break
    else:
        pass

if flg:
    print("APPROVED")
else:
    print("DENIED")     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 flg=True flg True for i in A:
    if i%2==0:
        if i%3==0 or i%5==0:
            pass
        else:
            flg=False
            break
    else:
        pass i A if i%2==0:
        if i%3==0 or i%5==0:
            pass
        else:
            flg=False
            break
    else:
        pass i%2==0 i%2 i 2 0 if i%3==0 or i%5==0:
            pass
        else:
            flg=False
            break
     i%3==0 or i%5==0 i%3==0 i%3 i 3 0 i%5==0 i%5 i 5 0 flg=False flg False break if flg:
    print("APPROVED")
else:
    print("DENIED")     flg print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" N=int(input()) int(input()) N flg=True True flg A=list(map(int,input().split())) list(map(int,input().split())) A flg=False False flg
N=int(input())

A=list(map(int,input().split()))

flg=True
for i in A:
    if i%2==0:
        if i%3==0 or i%5==0:
            pass
        else:
            flg=False
            break
    else:
        pass

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