import java.util.Scanner;

public class Main{
	public static void main(String[] args){
    		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		int[] value = new int[n];
		int i=0;
		for (;i<value.length; i++){
			value[i] = sc.nextInt();
			if ((value[i]%2==0 && value[i]%3!=0) && (value[i]%2==0 && value[i]%5!=0)){
				break;
			}	//「偶数であるが、3でも5でも割り切れないもの」が出てきた時点でアウト、ループを抜ける
		}
		if (i==n){
			System.out.println("APPROVED");
		} else {
			System.out.println("DENIED");
		}	//全て条件を満たすときだけ上記ループを完遂するはず
		
    	}
  
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz