num_num = int(input())
numbers = list(map(int, input().split()))
numbers_even = []

for i in range(num_num):
    if numbers[i] % 2 == 0:
        numbers_even.append(numbers[i])
    else:
        pass
i = 1
for even in numbers_even:
    if even % 3 == 0 or even % 5 == 0:
        i += 1
        if i == num_num:
            break
    else:
        print("DENIED")
        exit()

print("APPROVED") num_num = int(input()) num_num int(input()) int input() input numbers = list(map(int, input().split())) numbers list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split numbers_even = [] numbers_even [] for i in range(num_num):
    if numbers[i] % 2 == 0:
        numbers_even.append(numbers[i])
    else:
        pass i range(num_num) range num_num if numbers[i] % 2 == 0:
        numbers_even.append(numbers[i])
    else:
        pass numbers[i] % 2 == 0 numbers[i] % 2 numbers[i] numbers i 2 0 numbers_even.append(numbers[i]) numbers_even.append numbers_even append numbers[i] numbers i i = 1 i 1 for even in numbers_even:
    if even % 3 == 0 or even % 5 == 0:
        i += 1
        if i == num_num:
            break
    else:
        print("DENIED")
        exit() even numbers_even if even % 3 == 0 or even % 5 == 0:
        i += 1
        if i == num_num:
            break
    else:
        print("DENIED")
        exit() even % 3 == 0 or even % 5 == 0 even % 3 == 0 even % 3 even 3 0 even % 5 == 0 even % 5 even 5 0 i += 1 i 1 if i == num_num:
            break
     i == num_num i num_num break print("DENIED") print "DENIED" exit() exit print("APPROVED") print "APPROVED" num_num = int(input()) int(input()) num_num numbers = list(map(int, input().split())) list(map(int, input().split())) numbers numbers_even = [] [] numbers_even i = 1 1 i i += 1 1 i
num_num = int(input())
numbers = list(map(int, input().split()))
numbers_even = []

for i in range(num_num):
    if numbers[i] % 2 == 0:
        numbers_even.append(numbers[i])
    else:
        pass
i = 1
for even in numbers_even:
    if even % 3 == 0 or even % 5 == 0:
        i += 1
        if i == num_num:
            break
    else:
        print("DENIED")
        exit()

print("APPROVED")
