N = int(input())
list_A = [int(m) for m in input().split()]

for i in list_A:
    if i % 2 != 0:
       continue
    elif not (i % 3 == 0 or i % 5 == 0):
            print("DENIED")
            exit()


print("APPROVED") N = int(input()) N int(input()) int input() input int(m) for m in input().split() for m in input().split() m input().split() ().split () input split for m in input().split() int(m) int m list_A = [int(m) for m in input().split()] list_A [int(m) for m in input().split()] for i in list_A:
    if i % 2 != 0:
       continue
    elif not (i % 3 == 0 or i % 5 == 0):
            print("DENIED")
            exit() i list_A if i % 2 != 0:
       continue
    elif not (i % 3 == 0 or i % 5 == 0):
            print("DENIED")
            exit() i % 2 != 0 i % 2 i 2 0 continue elif not (i % 3 == 0 or i % 5 == 0):
            print("DENIED")
            exit() not (i % 3 == 0 or i % 5 == 0) i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 print("DENIED") print "DENIED" exit() exit print("APPROVED") print "APPROVED" list_A = [int(m) for m in input().split()] [int(m) for m in input().split()] list_A N = int(input()) int(input()) N
N = int(input())
list_A = [int(m) for m in input().split()]

for i in list_A:
    if i % 2 != 0:
       continue
    elif not (i % 3 == 0 or i % 5 == 0):
            print("DENIED")
            exit()


print("APPROVED")