n = int(input())
a = list(input().split())
tmp = []
flag = 0
for i in range(n):
    if int(a[i]) % 2 == 0:
        tmp.append(a[i])
for j in range(len(tmp)):
    if int(tmp[j]) % 3 == 0 or int(tmp[j]) % 5 == 0:
        continue
    else:
        flag = 1
if flag == 1 : print("DENIED")  
else : print("APPROVED") n = int(input()) n int(input()) int input() input a = list(input().split()) a list(input().split()) list input().split() ().split () input split tmp = [] tmp [] flag = 0 flag 0 for i in range(n):
    if int(a[i]) % 2 == 0:
        tmp.append(a[i]) i range(n) range n if int(a[i]) % 2 == 0:
        tmp.append(a[i]) int(a[i]) % 2 == 0 int(a[i]) % 2 int(a[i]) int a[i] a i 2 0 tmp.append(a[i]) tmp.append tmp append a[i] a i for j in range(len(tmp)):
    if int(tmp[j]) % 3 == 0 or int(tmp[j]) % 5 == 0:
        continue
    else:
        flag = 1 j range(len(tmp)) range len(tmp) len tmp if int(tmp[j]) % 3 == 0 or int(tmp[j]) % 5 == 0:
        continue
    else:
        flag = 1 int(tmp[j]) % 3 == 0 or int(tmp[j]) % 5 == 0 int(tmp[j]) % 3 == 0 int(tmp[j]) % 3 int(tmp[j]) int tmp[j] tmp j 3 0 int(tmp[j]) % 5 == 0 int(tmp[j]) % 5 int(tmp[j]) int tmp[j] tmp j 5 0 continue flag = 1 flag 1 if flag == 1 : print("DENIED")  
else : print("APPROVED") flag == 1 flag 1 flag = 1 1 flag flag = 0 0 flag tmp = [] [] tmp a = list(input().split()) list(input().split()) a n = int(input()) int(input()) n
n = int(input())
a = list(input().split())
tmp = []
flag = 0
for i in range(n):
    if int(a[i]) % 2 == 0:
        tmp.append(a[i])
for j in range(len(tmp)):
    if int(tmp[j]) % 3 == 0 or int(tmp[j]) % 5 == 0:
        continue
    else:
        flag = 1
if flag == 1 : print("DENIED")  
else : print("APPROVED")