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

l = []
for a in A:
    if a % 2 == 0:
        l.append(a)

if all([i % 3 ==0 or i % 5 ==0 for i in l]):
    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 l = [] l [] for a in A:
    if a % 2 == 0:
        l.append(a) a A if a % 2 == 0:
        l.append(a) a % 2 == 0 a % 2 a 2 0 l.append(a) l.append l append a if all([i % 3 ==0 or i % 5 ==0 for i in l]):
    print('APPROVED')
else:
    print('DENIED') all([i % 3 ==0 or i % 5 ==0 for i in l]) all [i % 3 ==0 or i % 5 ==0 for i in l] print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' l = [] [] l A = list(map(int, input().split())) list(map(int, input().split())) A n =  int(input()) int(input()) n
n =  int(input())
A = list(map(int, input().split()))

l = []
for a in A:
    if a % 2 == 0:
        l.append(a)

if all([i % 3 ==0 or i % 5 ==0 for i in l]):
    print('APPROVED')
else:
    print('DENIED')