n = int(input())
a = [int(s) for s in input().split()]

ans = 'APPROVED'

for num in a:
    if num % 2 == 0:
        if num % 3 != 0 and num % 5 != 0:
            ans = 'DENIED'
            break
print(ans) n = int(input()) n int(input()) int input() input int(s) for s in input().split() for s in input().split() s input().split() ().split () input split for s in input().split() int(s) int s a = [int(s) for s in input().split()] a [int(s) for s in input().split()] ans = 'APPROVED' ans 'APPROVED' for num in a:
    if num % 2 == 0:
        if num % 3 != 0 and num % 5 != 0:
            ans = 'DENIED'
            break num a if num % 2 == 0:
        if num % 3 != 0 and num % 5 != 0:
            ans = 'DENIED'
            break num % 2 == 0 num % 2 num 2 0 if num % 3 != 0 and num % 5 != 0:
            ans = 'DENIED'
            break num % 3 != 0 and num % 5 != 0 num % 3 != 0 num % 3 num 3 0 num % 5 != 0 num % 5 num 5 0 ans = 'DENIED' ans 'DENIED' break print(ans) print ans ans = 'DENIED' 'DENIED' ans n = int(input()) int(input()) n ans = 'APPROVED' 'APPROVED' ans a = [int(s) for s in input().split()] [int(s) for s in input().split()] a
n = int(input())
a = [int(s) for s in input().split()]

ans = 'APPROVED'

for num in a:
    if num % 2 == 0:
        if num % 3 != 0 and num % 5 != 0:
            ans = 'DENIED'
            break
print(ans)