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

for n in a:
    if n % 2 == 0:
        if not n % 3 == 0 and not n % 5 == 0:
            print("DENIED")
            break
else:
    print("APPROVED") 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 for n in a:
    if n % 2 == 0:
        if not n % 3 == 0 and not n % 5 == 0:
            print("DENIED")
            break
else:
    print("APPROVED") n a if n % 2 == 0:
        if not n % 3 == 0 and not n % 5 == 0:
            print("DENIED")
            break n % 2 == 0 n % 2 n 2 0 if not n % 3 == 0 and not n % 5 == 0:
            print("DENIED")
            break not n % 3 == 0 and not n % 5 == 0 not n % 3 == 0 n % 3 == 0 n % 3 n 3 0 not n % 5 == 0 n % 5 == 0 n % 5 n 5 0 print("DENIED") print "DENIED" break print("APPROVED") print "APPROVED" n = int(input()) int(input()) n a = list(map(int, input().split())) list(map(int, input().split())) a
n = int(input())
a = list(map(int, input().split()))

for n in a:
    if n % 2 == 0:
        if not n % 3 == 0 and not n % 5 == 0:
            print("DENIED")
            break
else:
    print("APPROVED")