n = int(input())
vals = list(map(int, input().split()))

qual = all(v % 2 == 1 or (v % 3 == 0 or v % 5 == 0) for v in vals)

if qual:
  print('APPROVED')
else:
  print('DENIED') n = int(input()) n int(input()) int input() input vals = list(map(int, input().split())) vals list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split qual = all(v % 2 == 1 or (v % 3 == 0 or v % 5 == 0) for v in vals) qual all(v % 2 == 1 or (v % 3 == 0 or v % 5 == 0) for v in vals) all v % 2 == 1 or (v % 3 == 0 or v % 5 == 0) v % 2 == 1 v % 2 v 2 1 v % 3 == 0 or v % 5 == 0 v % 3 == 0 v % 3 v 3 0 v % 5 == 0 v % 5 v 5 0 if qual:
  print('APPROVED')
else:
  print('DENIED') qual print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' vals = list(map(int, input().split())) list(map(int, input().split())) vals n = int(input()) int(input()) n qual = all(v % 2 == 1 or (v % 3 == 0 or v % 5 == 0) for v in vals) all(v % 2 == 1 or (v % 3 == 0 or v % 5 == 0) for v in vals) qual
n = int(input())
vals = list(map(int, input().split()))

qual = all(v % 2 == 1 or (v % 3 == 0 or v % 5 == 0) for v in vals)

if qual:
  print('APPROVED')
else:
  print('DENIED')
