import sys
input = sys.stdin.readline

n, s, f = int(input()), list(map(int, input().split())), True
for e in s:
  if not e & 1:
    if 0 not in [e % 3, e % 5]: f = False; break
print('APPROVED' if f else 'DENIED') import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline n, s, f = int(input()), list(map(int, input().split())), True n int(input()) int input() input s list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split f True for e in s:
  if not e & 1:
    if 0 not in [e % 3, e % 5]: f = False; break e s if not e & 1:
    if 0 not in [e % 3, e % 5]: f = False; break not e & 1 e & 1 e 1 if 0 not in [e % 3, e % 5]: f = False; b 0 not in [e % 3, e % 5] 0 [e % 3, e % 5] e % 3 e 3 e % 5 e 5 print('APPROVED' if f else 'DENIED') print 'APPROVED' if f else 'DENIED' f 'APPROVED' 'DENIED' n, s, f = int(input()), list(map(int, input().split())), True int(input()) n input = sys.stdin.readline sys.stdin.readline input s, f = int(input()), list(map(int, input().split())), True list(map(int, input().split())) s f = int(input()), list(map(int, input().split())), True True f
import sys
input = sys.stdin.readline

n, s, f = int(input()), list(map(int, input().split())), True
for e in s:
  if not e & 1:
    if 0 not in [e % 3, e % 5]: f = False; break
print('APPROVED' if f else 'DENIED')
