n = int(input())
a = [int(x) for x in input().split()]
res = "APPROVED"
for i in range(n):
  if a[i] % 2 == 0:
    if a[i] % 3 != 0 and a[i] % 5 != 0:
      res = "DENIED"
print(res) n = int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a = [int(x) for x in input().split()] a [int(x) for x in input().split()] res = "APPROVED" res "APPROVED" for i in range(n):
  if a[i] % 2 == 0:
    if a[i] % 3 != 0 and a[i] % 5 != 0:
      res = "DENIED" i range(n) range n if a[i] % 2 == 0:
    if a[i] % 3 != 0 and a[i] % 5 != 0:
      res = "DENIED" a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 if a[i] % 3 != 0 and a[i] % 5 != 0:
      res = "DENIED" a[i] % 3 != 0 and 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 res = "DENIED" res "DENIED" print(res) print res n = int(input()) int(input()) n res = "APPROVED" "APPROVED" res res = "DENIED" "DENIED" res a = [int(x) for x in input().split()] [int(x) for x in input().split()] a
n = int(input())
a = [int(x) for x in input().split()]
res = "APPROVED"
for i in range(n):
  if a[i] % 2 == 0:
    if a[i] % 3 != 0 and a[i] % 5 != 0:
      res = "DENIED"
print(res)