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

for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            ch = 1

if ch == 0:
    ans = 'APPROVED'
else:
    ans = 'DENIED'

print(ans) 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 ch = 0 ch 0 for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            ch = 1 i range(n) range n if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            ch = 1 a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 if a[i] % 3 != 0 and a[i] % 5 != 0:
            ch = 1 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 ch = 1 ch 1 if ch == 0:
    ans = 'APPROVED'
else:
    ans = 'DENIED' ch == 0 ch 0 ans = 'APPROVED' ans 'APPROVED' ans = 'DENIED' ans 'DENIED' print(ans) print ans ans = 'APPROVED' 'APPROVED' ans n = int(input()) int(input()) n ans = 'DENIED' 'DENIED' ans a = list(map(int, input().split())) list(map(int, input().split())) a ch = 0 0 ch ch = 1 1 ch
n = int(input())
a = list(map(int, input().split()))
ch = 0

for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            ch = 1

if ch == 0:
    ans = 'APPROVED'
else:
    ans = 'DENIED'

print(ans)
