N = int(input())
A = list(map(int,input().split()))
x = True

for i in range(N):
  if A[i] % 2 != 0:
    continue
  if not (A[i]%3==0 or A[i]%5==0):
    x = False
if x:
  print("APPROVED")
else:
  print("DENIED") 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 x = True x True for i in range(N):
  if A[i] % 2 != 0:
    continue
  if not (A[i]%3==0 or A[i]%5==0):
    x = False i range(N) range N if A[i] % 2 != 0:
    continue
   A[i] % 2 != 0 A[i] % 2 A[i] A i 2 0 continue if not (A[i]%3==0 or A[i]%5==0):
    x = False not (A[i]%3==0 or A[i]%5==0) A[i]%3==0 or A[i]%5==0 A[i]%3==0 A[i]%3 A[i] A i 3 0 A[i]%5==0 A[i]%5 A[i] A i 5 0 x = False x False if x:
  print("APPROVED")
else:
  print("DENIED") x print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" N = int(input()) int(input()) N A = list(map(int,input().split())) list(map(int,input().split())) A x = True True x x = False False x
N = int(input())
A = list(map(int,input().split()))
x = True

for i in range(N):
  if A[i] % 2 != 0:
    continue
  if not (A[i]%3==0 or A[i]%5==0):
    x = False
if x:
  print("APPROVED")
else:
  print("DENIED")