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

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

lst = []
for i in A:
    if i % 2 == 0:
        lst.append(i)
lst2 = []
if lst:
    for j in lst:
        if j % 3 == 0 or j % 5 == 0:
            lst2.append(j)
    if lst == lst2:
        print('APPROVED')
    else:
        print('DENIED')
else:
    print('APPROVED')