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