# 数値の取得
num_cnt = int(input())
num_list = list(map(int,input().split()))

# 数値の検査後メッセージを出力
judge = "APPROVED"
for cnt in range(0,num_cnt,1):
    if num_list[cnt] % 2 == 0\
    and num_list[cnt] % 3 != 0\
    and num_list[cnt] % 5 != 0:
      judge = "DENIED"
      
print(judge) num_cnt = int(input()) num_cnt int(input()) int input() input num_list = list(map(int,input().split())) num_list list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split judge = "APPROVED" judge "APPROVED" for cnt in range(0,num_cnt,1):
    if num_list[cnt] % 2 == 0\
    and num_list[cnt] % 3 != 0\
    and num_list[cnt] % 5 != 0:
      judge = "DENIED"
       cnt range(0,num_cnt,1) range 0 num_cnt 1 if num_list[cnt] % 2 == 0\
    and num_list[cnt] % 3 != 0\
    and num_list[cnt] % 5 != 0:
      judge = "DENIED"
       num_list[cnt] % 2 == 0\
    and num_list[cnt] % 3 != 0\
    and num_list[cnt] % 5 != 0 num_list[cnt] % 2 == 0\
    and num_list[cnt] % 3 != 0 num_list[cnt] % 2 == 0 num_list[cnt] % 2 num_list[cnt] num_list cnt 2 0 num_list[cnt] % 3 != 0 num_list[cnt] % 3 num_list[cnt] num_list cnt 3 0 num_list[cnt] % 5 != 0 num_list[cnt] % 5 num_list[cnt] num_list cnt 5 0 judge = "DENIED" judge "DENIED" print(judge) print judge num_cnt = int(input()) int(input()) num_cnt judge = "DENIED" "DENIED" judge num_list = list(map(int,input().split())) list(map(int,input().split())) num_list judge = "APPROVED" "APPROVED" judge
# 数値の取得
num_cnt = int(input())
num_list = list(map(int,input().split()))

# 数値の検査後メッセージを出力
judge = "APPROVED"
for cnt in range(0,num_cnt,1):
    if num_list[cnt] % 2 == 0\
    and num_list[cnt] % 3 != 0\
    and num_list[cnt] % 5 != 0:
      judge = "DENIED"
      
print(judge)