n = int(input())
a = list(map(int, input().split()))
print('DENIED' if sum(ai % 3 != 0 and ai % 5 != 0 for ai in a if ai % 2 == 0) else '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 print('DENIED' if sum(ai % 3 != 0 and ai % 5 != 0 for ai in a if ai % 2 == 0) else 'APPROVED') print 'DENIED' if sum(ai % 3 != 0 and ai % 5 != 0 for ai in a if ai % 2 == 0) else 'APPROVED' sum(ai % 3 != 0 and ai % 5 != 0 for ai in a if ai % 2 == 0) sum ai % 3 != 0 and ai % 5 != 0 ai % 3 != 0 ai % 3 ai 3 0 ai % 5 != 0 ai % 5 ai 5 0 'DENIED' 'APPROVED' a = list(map(int, input().split())) list(map(int, input().split())) a n = int(input()) int(input()) n
n = int(input())
a = list(map(int, input().split()))
print('DENIED' if sum(ai % 3 != 0 and ai % 5 != 0 for ai in a if ai % 2 == 0) else 'APPROVED')