N = int(input())
A = list(map(int, input().split()))
j = 0
for i in A:
    if i % 2 == 0:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            j += 1
    else:
        pass
if j > 0:
    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 j = 0 j 0 for i in A:
    if i % 2 == 0:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            j += 1
    else:
        pass i A if i % 2 == 0:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            j += 1
    else:
        pass i % 2 == 0 i % 2 i 2 0 if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            j += 1
     i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 j += 1 j 1 if j > 0:
    print('DENIED')
else:
    print('APPROVED') j > 0 j 0 print('DENIED') print 'DENIED' print('APPROVED') print 'APPROVED' j = 0 0 j N = int(input()) int(input()) N A = list(map(int, input().split())) list(map(int, input().split())) A j += 1 1 j
N = int(input())
A = list(map(int, input().split()))
j = 0
for i in A:
    if i % 2 == 0:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            j += 1
    else:
        pass
if j > 0:
    print('DENIED')
else:
    print('APPROVED')
