import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))

for i in a:
    if i % 2 == 0:
        if i % 3 == 0 or i % 5 == 0:
            continue
        else:
            print("DENIED")
            exit()

print("APPROVED") import sys sys sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline n = int(input()) n int(input()) int input() input a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in a:
    if i % 2 == 0:
        if i % 3 == 0 or i % 5 == 0:
            continue
        else:
            print("DENIED")
            exit() i a if i % 2 == 0:
        if i % 3 == 0 or i % 5 == 0:
            continue
        else:
            print("DENIED")
            exit() i % 2 == 0 i % 2 i 2 0 if i % 3 == 0 or i % 5 == 0:
            continue
        else:
            print("DENIED")
            exit() i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 continue print("DENIED") print "DENIED" exit() exit print("APPROVED") print "APPROVED" n = int(input()) int(input()) n input = sys.stdin.readline sys.stdin.readline input a = list(map(int, input().split())) list(map(int, input().split())) a
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))

for i in a:
    if i % 2 == 0:
        if i % 3 == 0 or i % 5 == 0:
            continue
        else:
            print("DENIED")
            exit()

print("APPROVED")
