# Template 1.0
import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()

a = LIST()
flag = 0
for el in a:
    if(el%2==0):
        if(el%3==0 or el%5==0):
            continue
        else:
            flag = 1
            break
if(flag==0):
    print("APPROVED")
else:
    print("DENIED") import sys, re sys re from collections import deque, defaultdict, Counter, OrderedDict from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log from heapq import heappush, heappop, heapify, nlargest, nsmallest def STR(): return list(input()) STR def INT(): return int(input()) INT def MAP(): return map(int, input().split()) MAP def LIST(): return list(map(int, input().split())) LIST [c] * b for i in range(a) for i in range(a) i range(a) range a for i in range(a) [c] * b [c] c b def list2d(a, b, c): return [[c] * b for i in range(a)] list2d a a b b c c def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx])) sortListWithIndex listOfTuples listOfTuples idx idx def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret sortDictWithVal temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0])) temp sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0])) sorted passedDic.items() passedDic.items passedDic items key=lambda kv: (kv[1], kv[0]) key lambda kv: (kv[1], kv[0]) (kv[1], kv[0]) kv[1] kv 1 kv[0] kv 0 kv toret = {} toret {} for tup in temp:
        toret[tup[0]] = tup[1]
     tup temp toret[tup[0]] = tup[1] toret[tup[0]] toret tup[0] tup 0 tup[1] tup 1 return toret toret passedDic passedDic def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items()))) sortDictWithKey return dict(OrderedDict(sorted(passedDic.items()))) dict(OrderedDict(sorted(passedDic.items()))) dict OrderedDict(sorted(passedDic.items())) OrderedDict sorted(passedDic.items()) sorted passedDic.items() passedDic.items passedDic items passedDic passedDic sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = float('inf') INF float('inf') float 'inf' mod = 10 ** 9 + 7 mod 10 ** 9 + 7 10 ** 9 10 9 7 n = INT() n INT() INT a = LIST() a LIST() LIST flag = 0 flag 0 for el in a:
    if(el%2==0):
        if(el%3==0 or el%5==0):
            continue
        else:
            flag = 1
            break el a if(el%2==0):
        if(el%3==0 or el%5==0):
            continue
        else:
            flag = 1
            break el%2==0 el%2 el 2 0 if(el%3==0 or el%5==0):
            continue
        else:
            flag = 1
            break el%3==0 or el%5==0 el%3==0 el%3 el 3 0 el%5==0 el%5 el 5 0 continue flag = 1 flag 1 break if(flag==0):
    print("APPROVED")
else:
    print("DENIED") flag==0 flag 0 print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" def STR(): return list(input()) def STR(): return list(input()) STR def MAP(): return map(int, input().split()) def MAP(): return map(int, input().split()) MAP def list2d(a, b, c): return [[c] * b for i in range(a)] def list2d(a, b, c): return [[c] * b for i in range(a)] list2d INF = float('inf') float('inf') INF def INT(): return int(input()) def INT(): return int(input()) INT mod = 10 ** 9 + 7 10 ** 9 + 7 mod flag = 0 0 flag n = INT() INT() n def LIST(): return list(map(int, input().split())) def LIST(): return list(map(int, input().split())) LIST flag = 1 1 flag def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx])) def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx])) sortListWithIndex def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items()))) def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items()))) sortDictWithKey a = LIST() LIST() a def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret sortDictWithVal
# Template 1.0
import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()

a = LIST()
flag = 0
for el in a:
    if(el%2==0):
        if(el%3==0 or el%5==0):
            continue
        else:
            flag = 1
            break
if(flag==0):
    print("APPROVED")
else:
    print("DENIED")