from sys import exit

N = int(input())

for i in input().split():
    if int(i) % 2 == 0:
        if int(i) % 3 != 0 and int(i) % 5 != 0:
            print('DENIED')
            exit()

print('APPROVED') from sys import exit N = int(input()) N int(input()) int input() input for i in input().split():
    if int(i) % 2 == 0:
        if int(i) % 3 != 0 and int(i) % 5 != 0:
            print('DENIED')
            exit() i input().split() ().split () input split if int(i) % 2 == 0:
        if int(i) % 3 != 0 and int(i) % 5 != 0:
            print('DENIED')
            exit() int(i) % 2 == 0 int(i) % 2 int(i) int i 2 0 if int(i) % 3 != 0 and int(i) % 5 != 0:
            print('DENIED')
            exit() int(i) % 3 != 0 and int(i) % 5 != 0 int(i) % 3 != 0 int(i) % 3 int(i) int i 3 0 int(i) % 5 != 0 int(i) % 5 int(i) int i 5 0 print('DENIED') print 'DENIED' exit() exit print('APPROVED') print 'APPROVED' N = int(input()) int(input()) N
from sys import exit

N = int(input())

for i in input().split():
    if int(i) % 2 == 0:
        if int(i) % 3 != 0 and int(i) % 5 != 0:
            print('DENIED')
            exit()

print('APPROVED')
