from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

A = LI()

ans = True
for a in A:
    if a % 2 != 0:
        continue

    if a % 3 != 0 and a % 5 != 0:
        ans = False

if ans:
    print("APPROVED")
else:
    print("DENIED") from math import floor,ceil,sqrt,factorial,log from collections import Counter, deque from functools import reduce import itertools itertools def S(): return input() S def I(): return int(input()) I def MS(): return map(str,input().split()) MS def MI(): return map(int,input().split()) MI int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i def FLI(): return [int(i) for i in input().split()] FLI def LS(): return list(MS()) LS def LI(): return list(MI()) LI list(map(str, l.split() )) for l in input() for l in input() l input() input for l in input() list(map(str, l.split() )) list map(str, l.split() ) map str l.split() l.split l split def LLS(): return [list(map(str, l.split() )) for l in input()] LLS list(map(int, l.split() )) for l in input() for l in input() l input() input for l in input() list(map(int, l.split() )) list map(int, l.split() ) map int l.split() l.split l split def LLI(): return [list(map(int, l.split() )) for l in input()] LLI LS() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) LS() LS def LLSN(n: int): return [LS() for _ in range(n)] LLSN n: int n LI() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) LI() LI def LLIN(n: int): return [LI() for _ in range(n)] LLIN n: int n N = I() N I() I A = LI() A LI() LI ans = True ans True for a in A:
    if a % 2 != 0:
        continue

    if a % 3 != 0 and a % 5 != 0:
        ans = False a A if a % 2 != 0:
        continue

     a % 2 != 0 a % 2 a 2 0 continue if a % 3 != 0 and a % 5 != 0:
        ans = False a % 3 != 0 and a % 5 != 0 a % 3 != 0 a % 3 a 3 0 a % 5 != 0 a % 5 a 5 0 ans = False ans False if ans:
    print("APPROVED")
else:
    print("DENIED") ans print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" def LLS(): return [list(map(str, l.split() )) for l in input()] def LLS(): return [list(map(str, l.split() )) for l in input()] LLS def MS(): return map(str,input().split()) def MS(): return map(str,input().split()) MS ans = False False ans A = LI() LI() A def LLIN(n: int): return [LI() for _ in range(n)] def LLIN(n: int): return [LI() for _ in range(n)] LLIN def LI(): return list(MI()) def LI(): return list(MI()) LI def LLI(): return [list(map(int, l.split() )) for l in input()] def LLI(): return [list(map(int, l.split() )) for l in input()] LLI def LLSN(n: int): return [LS() for _ in range(n)] def LLSN(n: int): return [LS() for _ in range(n)] LLSN def MI(): return map(int,input().split()) def MI(): return map(int,input().split()) MI def I(): return int(input()) def I(): return int(input()) I N = I() I() N def FLI(): return [int(i) for i in input().split()] def FLI(): return [int(i) for i in input().split()] FLI ans = True True ans def S(): return input() def S(): return input() S def LS(): return list(MS()) def LS(): return list(MS()) LS
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

A = LI()

ans = True
for a in A:
    if a % 2 != 0:
        continue

    if a % 3 != 0 and a % 5 != 0:
        ans = False

if ans:
    print("APPROVED")
else:
    print("DENIED")
