import java.util.*;
public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N;
  	N = sc.nextInt();
  	if(N==0) System.exit(0);

  	int[] a = new int[N];
  	for (int i=0;i<N;i++){
		a[i] = sc.nextInt();
	}
  	
  	for (int j=0;j<N;j++){
      	if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        }
    }

  	System.out.println("APPROVED");
	
  	System.exit(0);
	}
} import java.util.*; util.* java public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N;
  	N = sc.nextInt();
  	if(N==0) System.exit(0);

  	int[] a = new int[N];
  	for (int i=0;i<N;i++){
		a[i] = sc.nextInt();
	}
  	
  	for (int j=0;j<N;j++){
      	if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        }
    }

  	System.out.println("APPROVED");
	
  	System.exit(0);
	}
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N;
  	N = sc.nextInt();
  	if(N==0) System.exit(0);

  	int[] a = new int[N];
  	for (int i=0;i<N;i++){
		a[i] = sc.nextInt();
	}
  	
  	for (int j=0;j<N;j++){
      	if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        }
    }

  	System.out.println("APPROVED");
	
  	System.exit(0);
	} main {
	Scanner sc = new Scanner(System.in);
	int N;
  	N = sc.nextInt();
  	if(N==0) System.exit(0);

  	int[] a = new int[N];
  	for (int i=0;i<N;i++){
		a[i] = sc.nextInt();
	}
  	
  	for (int j=0;j<N;j++){
      	if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        }
    }

  	System.out.println("APPROVED");
	
  	System.exit(0);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N; N N = sc.nextInt() N sc.nextInt() sc.nextInt sc if(N==0) System.exit(0); N==0 N 0 System.exit(0) System.exit System 0 int[] a = new int[N]; a new int[N] N for (int i=0;i<N;i++){
		a[i] = sc.nextInt();
	} int i=0; int i=0; i 0 i<N i N i++ i++ i {
		a[i] = sc.nextInt();
	} {
		a[i] = sc.nextInt();
	} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc for (int j=0;j<N;j++){
      	if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        }
    } int j=0; int j=0; j 0 j<N j N j++ j++ j {
      	if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        }
    } {
      	if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        }
    } if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        } a[j]%2 == 0 a[j]%2 a[j] a j 2 0 {
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        } if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            } (a[j]%3!=0)&&(a[j]%5!=0) (a[j]%3!=0) a[j]%3 a[j] a j 3 0 (a[j]%5!=0) a[j]%5 a[j] a j 5 0 {
              	System.out.println("DENIED");
              	System.exit(0);
            } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" System.exit(0) System.exit System 0 System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" System.exit(0) System.exit System 0 String[] args args public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N;
  	N = sc.nextInt();
  	if(N==0) System.exit(0);

  	int[] a = new int[N];
  	for (int i=0;i<N;i++){
		a[i] = sc.nextInt();
	}
  	
  	for (int j=0;j<N;j++){
      	if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        }
    }

  	System.out.println("APPROVED");
	
  	System.exit(0);
	}
} public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N;
  	N = sc.nextInt();
  	if(N==0) System.exit(0);

  	int[] a = new int[N];
  	for (int i=0;i<N;i++){
		a[i] = sc.nextInt();
	}
  	
  	for (int j=0;j<N;j++){
      	if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        }
    }

  	System.out.println("APPROVED");
	
  	System.exit(0);
	}
} Main
import java.util.*;
public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N;
  	N = sc.nextInt();
  	if(N==0) System.exit(0);

  	int[] a = new int[N];
  	for (int i=0;i<N;i++){
		a[i] = sc.nextInt();
	}
  	
  	for (int j=0;j<N;j++){
      	if(a[j]%2 == 0){
          	//System.out.println("a["+j+"]="+a[j]);
          	if((a[j]%3!=0)&&(a[j]%5!=0)){
              	System.out.println("DENIED");
              	System.exit(0);
            }
        }
    }

  	System.out.println("APPROVED");
	
  	System.exit(0);
	}
}