_ = input()
l = list(map(int, input().split(' ')))
print('APPROVED' if all([(a % 2 == 1 or a % 3 == 0 or a % 5 == 0) for a in l]) else 'DENIED') _ = input() _ input() input l = list(map(int, input().split(' '))) l list(map(int, input().split(' '))) list map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' (a % 2 == 1 or a % 3 == 0 or a % 5 == 0) for a in l for a in l a l for a in l a % 2 == 1 or a % 3 == 0 or a % 5 == 0 a % 2 == 1 or a % 3 == 0 a % 2 == 1 a % 2 a 2 1 a % 3 == 0 a % 3 a 3 0 a % 5 == 0 a % 5 a 5 0 print('APPROVED' if all([(a % 2 == 1 or a % 3 == 0 or a % 5 == 0) for a in l]) else 'DENIED') print 'APPROVED' if all([(a % 2 == 1 or a % 3 == 0 or a % 5 == 0) for a in l]) else 'DENIED' all([(a % 2 == 1 or a % 3 == 0 or a % 5 == 0) for a in l]) all [(a % 2 == 1 or a % 3 == 0 or a % 5 == 0) for a in l] 'APPROVED' 'DENIED' _ = input() input() _ l = list(map(int, input().split(' '))) list(map(int, input().split(' '))) l
_ = input()
l = list(map(int, input().split(' ')))
print('APPROVED' if all([(a % 2 == 1 or a % 3 == 0 or a % 5 == 0) for a in l]) else 'DENIED')
