n=input();print(['DENIED','APPROVED'][all([1 if j%3==0 or j%5==0 else 0 for j in [i for i in list(map(int,input().split())) if i%2==0]])]) 1 if j%3==0 or j%5==0 else 0 for j in [i for i in list(map(int,input().split())) if i%2==0] for j in [i for i in list(map(int,input().split())) if i%2==0] j [i for i in list(map(int,input().split())) if i%2==0] for j in [i for i in list(map(int,input().split())) if i%2==0] 1 if j%3==0 or j%5==0 else 0 j%3==0 or j%5==0 j%3==0 j%3 j 3 0 j%5==0 j%5 j 5 0 1 0 n=input() n input() input print(['DENIED','APPROVED'][all([1 if j%3==0 or j%5==0 else 0 for j in [i for i in list(map(int,input().split())) if i%2==0]])]) print ['DENIED','APPROVED'][all([1 if j%3==0 or j%5==0 else 0 for j in [i for i in list(map(int,input().split())) if i%2==0]])] ['DENIED','APPROVED'] 'DENIED' 'APPROVED' all([1 if j%3==0 or j%5==0 else 0 for j in [i for i in list(map(int,input().split())) if i%2==0]]) all [1 if j%3==0 or j%5==0 else 0 for j in [i for i in list(map(int,input().split())) if i%2==0]] n=input() input() n
n=input();print(['DENIED','APPROVED'][all([1 if j%3==0 or j%5==0 else 0 for j in [i for i in list(map(int,input().split())) if i%2==0]])])