n = int(input())
a = list(map(int, input().split()))
a_ = [i for i in a if i % 2 == 0]

for i in a_:
    bool_3 = i % 3 != 0
    bool_5 = i % 5 != 0
    if bool_3 and bool_5:
        print('DENIED')
        break
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 i for i in a if i % 2 == 0 for i in a if i % 2 == 0 i a i % 2 == 0 i % 2 i 2 0 if i % 2 == 0 i a_ = [i for i in a if i % 2 == 0] a_ [i for i in a if i % 2 == 0] for i in a_:
    bool_3 = i % 3 != 0
    bool_5 = i % 5 != 0
    if bool_3 and bool_5:
        print('DENIED')
        break
else:
    print('APPROVED') i a_ bool_3 = i % 3 != 0 bool_3 i % 3 != 0 i % 3 i 3 0 bool_5 = i % 5 != 0 bool_5 i % 5 != 0 i % 5 i 5 0 if bool_3 and bool_5:
        print('DENIED')
        break bool_3 and bool_5 bool_3 bool_5 print('DENIED') print 'DENIED' break print('APPROVED') print 'APPROVED' n = int(input()) int(input()) n bool_3 = i % 3 != 0 i % 3 != 0 bool_3 a = list(map(int, input().split())) list(map(int, input().split())) a a_ = [i for i in a if i % 2 == 0] [i for i in a if i % 2 == 0] a_ bool_5 = i % 5 != 0 i % 5 != 0 bool_5
n = int(input())
a = list(map(int, input().split()))
a_ = [i for i in a if i % 2 == 0]

for i in a_:
    bool_3 = i % 3 != 0
    bool_5 = i % 5 != 0
    if bool_3 and bool_5:
        print('DENIED')
        break
else:
    print('APPROVED')
