import os, sys, re, math

N = int(input())
A = [int(n) for n in input().split()]

answer = 'APPROVED'
for a in A:
    if a % 2 == 0:
        if not (a % 3 == 0 or a % 5 == 0):
            answer = 'DENIED'
            break

print(answer) import os, sys, re, math os sys re math N = int(input()) N int(input()) int input() input int(n) for n in input().split() for n in input().split() n input().split() ().split () input split for n in input().split() int(n) int n A = [int(n) for n in input().split()] A [int(n) for n in input().split()] answer = 'APPROVED' answer 'APPROVED' for a in A:
    if a % 2 == 0:
        if not (a % 3 == 0 or a % 5 == 0):
            answer = 'DENIED'
            break a A if a % 2 == 0:
        if not (a % 3 == 0 or a % 5 == 0):
            answer = 'DENIED'
            break a % 2 == 0 a % 2 a 2 0 if not (a % 3 == 0 or a % 5 == 0):
            answer = 'DENIED'
            break not (a % 3 == 0 or a % 5 == 0) a % 3 == 0 or a % 5 == 0 a % 3 == 0 a % 3 a 3 0 a % 5 == 0 a % 5 a 5 0 answer = 'DENIED' answer 'DENIED' break print(answer) print answer answer = 'DENIED' 'DENIED' answer A = [int(n) for n in input().split()] [int(n) for n in input().split()] A N = int(input()) int(input()) N answer = 'APPROVED' 'APPROVED' answer
import os, sys, re, math

N = int(input())
A = [int(n) for n in input().split()]

answer = 'APPROVED'
for a in A:
    if a % 2 == 0:
        if not (a % 3 == 0 or a % 5 == 0):
            answer = 'DENIED'
            break

print(answer)
