def main():
    n = int(input())
    s = list(map(int,input().strip().split()))
    e = []
    for ss in s:
        if ss % 2 == 0:
            e.append(ss)
    
    for ee in e:
        if ee % 3 == 0 or ee % 5 == 0:
            continue
        else:
            print("DENIED")
            return
    
    print("APPROVED")
    return

main() def main():
    n = int(input())
    s = list(map(int,input().strip().split()))
    e = []
    for ss in s:
        if ss % 2 == 0:
            e.append(ss)
    
    for ee in e:
        if ee % 3 == 0 or ee % 5 == 0:
            continue
        else:
            print("DENIED")
            return
    
    print("APPROVED")
    return main n = int(input()) n int(input()) int input() input s = list(map(int,input().strip().split())) s list(map(int,input().strip().split())) list map(int,input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split e = [] e [] for ss in s:
        if ss % 2 == 0:
            e.append(ss)
    
     ss s if ss % 2 == 0:
            e.append(ss)
    
     ss % 2 == 0 ss % 2 ss 2 0 e.append(ss) e.append e append ss for ee in e:
        if ee % 3 == 0 or ee % 5 == 0:
            continue
        else:
            print("DENIED")
            return
    
     ee e if ee % 3 == 0 or ee % 5 == 0:
            continue
        else:
            print("DENIED")
            return
    
     ee % 3 == 0 or ee % 5 == 0 ee % 3 == 0 ee % 3 ee 3 0 ee % 5 == 0 ee % 5 ee 5 0 continue print("DENIED") print "DENIED" return print("APPROVED") print "APPROVED" return main() main def main():
    n = int(input())
    s = list(map(int,input().strip().split()))
    e = []
    for ss in s:
        if ss % 2 == 0:
            e.append(ss)
    
    for ee in e:
        if ee % 3 == 0 or ee % 5 == 0:
            continue
        else:
            print("DENIED")
            return
    
    print("APPROVED")
    return def main():
    n = int(input())
    s = list(map(int,input().strip().split()))
    e = []
    for ss in s:
        if ss % 2 == 0:
            e.append(ss)
    
    for ee in e:
        if ee % 3 == 0 or ee % 5 == 0:
            continue
        else:
            print("DENIED")
            return
    
    print("APPROVED")
    return main
def main():
    n = int(input())
    s = list(map(int,input().strip().split()))
    e = []
    for ss in s:
        if ss % 2 == 0:
            e.append(ss)
    
    for ee in e:
        if ee % 3 == 0 or ee % 5 == 0:
            continue
        else:
            print("DENIED")
            return
    
    print("APPROVED")
    return

main()
