import sys
n=int(input())
a=list(map(int,input().split()))
b=a[:]

for i in range(len(a)):
    if a[i]%2!=0:
        b.remove(a[i])

for i in b:
    if i%3!=0:
        if i%5!=0:
            print('DENIED')
            sys.exit()
            
print('APPROVED') import sys sys 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 b=a[:] b a[:] a : for i in range(len(a)):
    if a[i]%2!=0:
        b.remove(a[i]) i range(len(a)) range len(a) len a if a[i]%2!=0:
        b.remove(a[i]) a[i]%2!=0 a[i]%2 a[i] a i 2 0 b.remove(a[i]) b.remove b remove a[i] a i for i in b:
    if i%3!=0:
        if i%5!=0:
            print('DENIED')
            sys.exit()
             i b if i%3!=0:
        if i%5!=0:
            print('DENIED')
            sys.exit()
             i%3!=0 i%3 i 3 0 if i%5!=0:
            print('DENIED')
            sys.exit()
             i%5!=0 i%5 i 5 0 print('DENIED') print 'DENIED' sys.exit() sys.exit sys exit print('APPROVED') print 'APPROVED' a=list(map(int,input().split())) list(map(int,input().split())) a n=int(input()) int(input()) n b=a[:] a[:] b
import sys
n=int(input())
a=list(map(int,input().split()))
b=a[:]

for i in range(len(a)):
    if a[i]%2!=0:
        b.remove(a[i])

for i in b:
    if i%3!=0:
        if i%5!=0:
            print('DENIED')
            sys.exit()
            
print('APPROVED')