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

res = True

for num in A:
    if num % 2 == 0 and num % 3 != 0 and num % 5 != 0:
        res = False
        break

print(['DENIED', 'APPROVED'][res]) 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 res = True res True for num in A:
    if num % 2 == 0 and num % 3 != 0 and num % 5 != 0:
        res = False
        break num A if num % 2 == 0 and num % 3 != 0 and num % 5 != 0:
        res = False
        break num % 2 == 0 and num % 3 != 0 and num % 5 != 0 num % 2 == 0 and num % 3 != 0 num % 2 == 0 num % 2 num 2 0 num % 3 != 0 num % 3 num 3 0 num % 5 != 0 num % 5 num 5 0 res = False res False break print(['DENIED', 'APPROVED'][res]) print ['DENIED', 'APPROVED'][res] ['DENIED', 'APPROVED'] 'DENIED' 'APPROVED' res A = list(map(int, input().split())) list(map(int, input().split())) A res = False False res res = True True res N = int(input()) int(input()) N
N = int(input())
A = list(map(int, input().split()))

res = True

for num in A:
    if num % 2 == 0 and num % 3 != 0 and num % 5 != 0:
        res = False
        break

print(['DENIED', 'APPROVED'][res])