n = int(input())
lst = list(map(int,input().split()))
c = 0
for i in range(n):
  if (lst[i]%2 == 0):
    if (lst[i]%3 != 0 and lst[i]%5 != 0):
      c = 1
if (c == 0):
  print("APPROVED")
else:
  print("DENIED") n = int(input()) n int(input()) int input() input lst = list(map(int,input().split())) lst list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split c = 0 c 0 for i in range(n):
  if (lst[i]%2 == 0):
    if (lst[i]%3 != 0 and lst[i]%5 != 0):
      c = 1 i range(n) range n if (lst[i]%2 == 0):
    if (lst[i]%3 != 0 and lst[i]%5 != 0):
      c = 1 lst[i]%2 == 0 lst[i]%2 lst[i] lst i 2 0 if (lst[i]%3 != 0 and lst[i]%5 != 0):
      c = 1 lst[i]%3 != 0 and lst[i]%5 != 0 lst[i]%3 != 0 lst[i]%3 lst[i] lst i 3 0 lst[i]%5 != 0 lst[i]%5 lst[i] lst i 5 0 c = 1 c 1 if (c == 0):
  print("APPROVED")
else:
  print("DENIED") c == 0 c 0 print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" c = 1 1 c lst = list(map(int,input().split())) list(map(int,input().split())) lst c = 0 0 c n = int(input()) int(input()) n
n = int(input())
lst = list(map(int,input().split()))
c = 0
for i in range(n):
  if (lst[i]%2 == 0):
    if (lst[i]%3 != 0 and lst[i]%5 != 0):
      c = 1
if (c == 0):
  print("APPROVED")
else:
  print("DENIED")
