import sys

import numpy as np



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N = ir()

A = np.array(lr())

A = A[A%2==0].tolist()

bool = True

for a in A:

    if a%3 != 0 and a%5 != 0:

        bool = False



print(('APPROVED' if bool else 'DENIED'))

# coding: utf-8

import sys



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N = ir()

A = lr()

bl = all(x % 3 == 0 or x % 5 == 0 for x in A if x % 2 == 0)

print(('APPROVED' if bl else 'DENIED'))

import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N = ir()
A = np.array(lr())
A = A[A % 2 == 0].tolist()
bool = True
for a in A:
    if a % 3 != 0 and a % 5 != 0:
        bool = False
print(("APPROVED" if bool else "DENIED"))

# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N = ir()
A = lr()
bl = all(x % 3 == 0 or x % 5 == 0 for x in A if x % 2 == 0)
print(("APPROVED" if bl else "DENIED"))

+# coding: utf-8 -import numpy as np -A = np.array(lr()) -A = A[A % 2 == 0].tolist() -bool = True -for a in A: -    if a % 3 != 0 and a % 5 != 0: -        bool = False -print(("APPROVED" if bool else "DENIED")) +A = lr() +bl = all(x % 3 == 0 or x % 5 == 0 for x in A if x % 2 == 0) +print(("APPROVED" if bl else "DENIED"))