import sys

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

n=int(input())
a=[int(x) for x in input().split()]
for i in range(n):
  if a[i]%2==0 and a[i]%3!=0 and a[i]%5!=0:
    print("DENIED")
    sys.exit()
print("APPROVED")    