# B - Papers, Please
# https://atcoder.jp/contests/abc155/tasks/abc155_b

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

even = 0
cnt = 0

for i in a:
    if i % 2 == 0:
        even += 1
        if i % 3 == 0 or i % 5 == 0:
            cnt += 1

if even == cnt:
    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 even = 0 even 0 cnt = 0 cnt 0 for i in a:
    if i % 2 == 0:
        even += 1
        if i % 3 == 0 or i % 5 == 0:
            cnt += 1 i a if i % 2 == 0:
        even += 1
        if i % 3 == 0 or i % 5 == 0:
            cnt += 1 i % 2 == 0 i % 2 i 2 0 even += 1 even 1 if i % 3 == 0 or i % 5 == 0:
            cnt += 1 i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 cnt += 1 cnt 1 if even == cnt:
    print('APPROVED')
else:
    print('DENIED') even == cnt even cnt print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' even = 0 0 even cnt = 0 0 cnt even += 1 1 even cnt += 1 1 cnt n = int(input()) int(input()) n a = list(map(int, input().split())) list(map(int, input().split())) a
# B - Papers, Please
# https://atcoder.jp/contests/abc155/tasks/abc155_b

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

even = 0
cnt = 0

for i in a:
    if i % 2 == 0:
        even += 1
        if i % 3 == 0 or i % 5 == 0:
            cnt += 1

if even == cnt:
    print('APPROVED')
else:
    print('DENIED')
