import numpy as np



n = int(eval(input()))

a = np.array([int(x) for x in input().split()])



aa = a[a%2 == 0]

aaa = aa[(aa%3 == 0) | (aa%5 == 0)]



if len(aa) == len(aaa):

    print("APPROVED")

else:

    print("DENIED")
import numpy as np



n = int(eval(input()))

a = np.array([int(x) for x in input().split()])



aa = a[a%2 == 0]

if np.all((aa%3 == 0) | (aa%5 == 0)):

    print("APPROVED")

else:

    print("DENIED")
import numpy as np

n = int(eval(input()))
a = np.array([int(x) for x in input().split()])
aa = a[a % 2 == 0]
aaa = aa[(aa % 3 == 0) | (aa % 5 == 0)]
if len(aa) == len(aaa):
    print("APPROVED")
else:
    print("DENIED")

import numpy as np

n = int(eval(input()))
a = np.array([int(x) for x in input().split()])
aa = a[a % 2 == 0]
if np.all((aa % 3 == 0) | (aa % 5 == 0)):
    print("APPROVED")
else:
    print("DENIED")

-aaa = aa[(aa % 3 == 0) | (aa % 5 == 0)] -if len(aa) == len(aaa): +if np.all((aa % 3 == 0) | (aa % 5 == 0)):