import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    n = I()
    a = Intl()
    for i in range(n):
        if a[i]%2 == 0:
            if a[i]%3 == 0 or a[i]%5 == 0:pass
            else:
                print("DENIED")
                exit()
    print("APPROVED") import sys sys import math math import itertools as it itertools def I():return int(sys.stdin.readline().replace("\n","")) I def I2():return map(int,sys.stdin.readline().replace("\n","").split()) I2 def S():return str(sys.stdin.readline().replace("\n","")) S def L():return list(sys.stdin.readline().replace("\n","")) L int(k) for k in sys.stdin.readline().replace("\n","").split() for k in sys.stdin.readline().replace("\n","").split() k sys.stdin.readline().replace("\n","").split() sys.stdin.readline().replace("\n","").split sys.stdin.readline().replace("\n","") sys.stdin.readline().replace sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline replace "\n" "" split for k in sys.stdin.readline().replace("\n","").split() int(k) int k def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()] Intl def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split())) Lx k k if __name__ == "__main__":
    n = I()
    a = Intl()
    for i in range(n):
        if a[i]%2 == 0:
            if a[i]%3 == 0 or a[i]%5 == 0:pass
            else:
                print("DENIED")
                exit()
    print("APPROVED") __name__ == "__main__" __name__ "__main__" n = I() n I() I a = Intl() a Intl() Intl for i in range(n):
        if a[i]%2 == 0:
            if a[i]%3 == 0 or a[i]%5 == 0:pass
            else:
                print("DENIED")
                exit()
     i range(n) range n if a[i]%2 == 0:
            if a[i]%3 == 0 or a[i]%5 == 0:pass
            else:
                print("DENIED")
                exit()
     a[i]%2 == 0 a[i]%2 a[i] a i 2 0 if a[i]%3 == 0 or a[i]%5 == 0:pass
            else:
                print("DENIED")
                exit()
     a[i]%3 == 0 or a[i]%5 == 0 a[i]%3 == 0 a[i]%3 a[i] a i 3 0 a[i]%5 == 0 a[i]%5 a[i] a i 5 0 print("DENIED") print "DENIED" exit() exit print("APPROVED") print "APPROVED" a = Intl() Intl() a n = I() I() n def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split())) def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split())) Lx def L():return list(sys.stdin.readline().replace("\n","")) def L():return list(sys.stdin.readline().replace("\n","")) L def I():return int(sys.stdin.readline().replace("\n","")) def I():return int(sys.stdin.readline().replace("\n","")) I def I2():return map(int,sys.stdin.readline().replace("\n","").split()) def I2():return map(int,sys.stdin.readline().replace("\n","").split()) I2 def S():return str(sys.stdin.readline().replace("\n","")) def S():return str(sys.stdin.readline().replace("\n","")) S def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()] def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()] Intl
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    n = I()
    a = Intl()
    for i in range(n):
        if a[i]%2 == 0:
            if a[i]%3 == 0 or a[i]%5 == 0:pass
            else:
                print("DENIED")
                exit()
    print("APPROVED")