N = int(input())
A = list(map(int, input().split()))

even_numbers = [a for a in A if a % 2 == 0]

is_approved = all([even_num % 3 == 0 or even_num % 5 == 0 for even_num in even_numbers])

if is_approved:
    print('APPROVED')
else:
    print('DENIED') 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 a for a in A if a % 2 == 0 for a in A if a % 2 == 0 a A a % 2 == 0 a % 2 a 2 0 if a % 2 == 0 a even_numbers = [a for a in A if a % 2 == 0] even_numbers [a for a in A if a % 2 == 0] even_num % 3 == 0 or even_num % 5 == 0 for even_num in even_numbers for even_num in even_numbers even_num even_numbers for even_num in even_numbers even_num % 3 == 0 or even_num % 5 == 0 even_num % 3 == 0 even_num % 3 even_num 3 0 even_num % 5 == 0 even_num % 5 even_num 5 0 is_approved = all([even_num % 3 == 0 or even_num % 5 == 0 for even_num in even_numbers]) is_approved all([even_num % 3 == 0 or even_num % 5 == 0 for even_num in even_numbers]) all [even_num % 3 == 0 or even_num % 5 == 0 for even_num in even_numbers] if is_approved:
    print('APPROVED')
else:
    print('DENIED') is_approved print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' A = list(map(int, input().split())) list(map(int, input().split())) A N = int(input()) int(input()) N even_numbers = [a for a in A if a % 2 == 0] [a for a in A if a % 2 == 0] even_numbers is_approved = all([even_num % 3 == 0 or even_num % 5 == 0 for even_num in even_numbers]) all([even_num % 3 == 0 or even_num % 5 == 0 for even_num in even_numbers]) is_approved
N = int(input())
A = list(map(int, input().split()))

even_numbers = [a for a in A if a % 2 == 0]

is_approved = all([even_num % 3 == 0 or even_num % 5 == 0 for even_num in even_numbers])

if is_approved:
    print('APPROVED')
else:
    print('DENIED')
