import sys
n=int(input())
data=list(map(int,input().split()))
for i in data:
    if i%2==1:
        continue
    if i%3!=0 and i%5!=0:
        print("DENIED")
        sys.exit()
print("APPROVED") import sys sys n=int(input()) n int(input()) int input() input data=list(map(int,input().split())) data list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in data:
    if i%2==1:
        continue
    if i%3!=0 and i%5!=0:
        print("DENIED")
        sys.exit() i data if i%2==1:
        continue
     i%2==1 i%2 i 2 1 continue if i%3!=0 and i%5!=0:
        print("DENIED")
        sys.exit() i%3!=0 and i%5!=0 i%3!=0 i%3 i 3 0 i%5!=0 i%5 i 5 0 print("DENIED") print "DENIED" sys.exit() sys.exit sys exit print("APPROVED") print "APPROVED" data=list(map(int,input().split())) list(map(int,input().split())) data n=int(input()) int(input()) n
import sys
n=int(input())
data=list(map(int,input().split()))
for i in data:
    if i%2==1:
        continue
    if i%3!=0 and i%5!=0:
        print("DENIED")
        sys.exit()
print("APPROVED")