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