import sys

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

for num in A:
    if num % 2 == 0:
        if not (num % 3 == 0 or num % 5 == 0):
            print("DENIED")
            sys.exit()

print("APPROVED") import sys sys 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 num in A:
    if num % 2 == 0:
        if not (num % 3 == 0 or num % 5 == 0):
            print("DENIED")
            sys.exit() num A if num % 2 == 0:
        if not (num % 3 == 0 or num % 5 == 0):
            print("DENIED")
            sys.exit() num % 2 == 0 num % 2 num 2 0 if not (num % 3 == 0 or num % 5 == 0):
            print("DENIED")
            sys.exit() not (num % 3 == 0 or num % 5 == 0) num % 3 == 0 or num % 5 == 0 num % 3 == 0 num % 3 num 3 0 num % 5 == 0 num % 5 num 5 0 print("DENIED") print "DENIED" sys.exit() sys.exit sys exit print("APPROVED") print "APPROVED" A = list(map(int,input().split())) list(map(int,input().split())) A N = int(input()) int(input()) N
import sys

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

for num in A:
    if num % 2 == 0:
        if not (num % 3 == 0 or num % 5 == 0):
            print("DENIED")
            sys.exit()

print("APPROVED")