# Papers, Please

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

for Ai in A:
  if Ai % 2 == 1:
    continue
  else:
    if Ai % 3 != 0 and Ai % 5 != 0:
      print("DENIED")
      exit()

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 Ai in A:
  if Ai % 2 == 1:
    continue
  else:
    if Ai % 3 != 0 and Ai % 5 != 0:
      print("DENIED")
      exit() Ai A if Ai % 2 == 1:
    continue
  else:
    if Ai % 3 != 0 and Ai % 5 != 0:
      print("DENIED")
      exit() Ai % 2 == 1 Ai % 2 Ai 2 1 continue if Ai % 3 != 0 and Ai % 5 != 0:
      print("DENIED")
      exit() Ai % 3 != 0 and Ai % 5 != 0 Ai % 3 != 0 Ai % 3 Ai 3 0 Ai % 5 != 0 Ai % 5 Ai 5 0 print("DENIED") print "DENIED" exit() exit print("APPROVED") print "APPROVED" N = int(input()) int(input()) N A = list(map(int, input().split())) list(map(int, input().split())) A
# Papers, Please

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

for Ai in A:
  if Ai % 2 == 1:
    continue
  else:
    if Ai % 3 != 0 and Ai % 5 != 0:
      print("DENIED")
      exit()

print("APPROVED")