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

for i in A:
    if i % 2 == 0 and i % 3 != 0 and i % 5 != 0:
        result = 'No'
        break
    else:
        result = 'Yes'

if result == 'No':
    print('DENIED')
else:
    print('APPROVED') 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 for i in A:
    if i % 2 == 0 and i % 3 != 0 and i % 5 != 0:
        result = 'No'
        break
    else:
        result = 'Yes' i A if i % 2 == 0 and i % 3 != 0 and i % 5 != 0:
        result = 'No'
        break
    else:
        result = 'Yes' i % 2 == 0 and i % 3 != 0 and i % 5 != 0 i % 2 == 0 and i % 3 != 0 i % 2 == 0 i % 2 i 2 0 i % 3 != 0 i % 3 i 3 0 i % 5 != 0 i % 5 i 5 0 result = 'No' result 'No' break result = 'Yes' result 'Yes' if result == 'No':
    print('DENIED')
else:
    print('APPROVED') result == 'No' result 'No' print('DENIED') print 'DENIED' print('APPROVED') print 'APPROVED' N = int(input()) int(input()) N A = list(map(int, input().split())) list(map(int, input().split())) A result = 'Yes' 'Yes' result result = 'No' 'No' result
N = int(input())
A = list(map(int, input().split()))

for i in A:
    if i % 2 == 0 and i % 3 != 0 and i % 5 != 0:
        result = 'No'
        break
    else:
        result = 'Yes'

if result == 'No':
    print('DENIED')
else:
    print('APPROVED')