import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

from  collections import defaultdict
from collections import Counter
def main():
    N = I()
    A = LI()
    for a in A:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 !=0:
                print('DENIED')
                exit()
    print('APPROVED')

if __name__ == "__main__":
    main() import bisect, collections, copy, heapq, itertools, math, string bisect collections copy heapq itertools math string import sys sys def I(): return int(sys.stdin.readline().rstrip()) I def MI(): return map(int, sys.stdin.readline().rstrip().split()) MI def LI(): return list(map(int, sys.stdin.readline().rstrip().split())) LI def S(): return sys.stdin.readline().rstrip() S def LS(): return list(sys.stdin.readline().rstrip().split()) LS from  collections import defaultdict from collections import Counter def main():
    N = I()
    A = LI()
    for a in A:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 !=0:
                print('DENIED')
                exit()
    print('APPROVED') main N = I() N I() I A = LI() A LI() LI for a in A:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 !=0:
                print('DENIED')
                exit()
     a A if a % 2 == 0:
            if a % 3 != 0 and a % 5 !=0:
                print('DENIED')
                exit()
     a % 2 == 0 a % 2 a 2 0 if a % 3 != 0 and a % 5 !=0:
                print('DENIED')
                exit()
     a % 3 != 0 and a % 5 !=0 a % 3 != 0 a % 3 a 3 0 a % 5 !=0 a % 5 a 5 0 print('DENIED') print 'DENIED' exit() exit print('APPROVED') print 'APPROVED' if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def LI(): return list(map(int, sys.stdin.readline().rstrip().split())) def LI(): return list(map(int, sys.stdin.readline().rstrip().split())) LI def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S def main():
    N = I()
    A = LI()
    for a in A:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 !=0:
                print('DENIED')
                exit()
    print('APPROVED') def main():
    N = I()
    A = LI()
    for a in A:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 !=0:
                print('DENIED')
                exit()
    print('APPROVED') main def MI(): return map(int, sys.stdin.readline().rstrip().split()) def MI(): return map(int, sys.stdin.readline().rstrip().split()) MI
import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

from  collections import defaultdict
from collections import Counter
def main():
    N = I()
    A = LI()
    for a in A:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 !=0:
                print('DENIED')
                exit()
    print('APPROVED')

if __name__ == "__main__":
    main()
