import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    List<Integer> A = new ArrayList<Integer>();
    String result = "APPROVED";

    int N = scan.nextInt();
    for(int i=0;i<N;i++) {
    A.add(scan.nextInt());
    }

for(int j:A) {
	if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	}

}
    System.out.println(result);
  }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    List<Integer> A = new ArrayList<Integer>();
    String result = "APPROVED";

    int N = scan.nextInt();
    for(int i=0;i<N;i++) {
    A.add(scan.nextInt());
    }

for(int j:A) {
	if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	}

}
    System.out.println(result);
  }
} Main public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    List<Integer> A = new ArrayList<Integer>();
    String result = "APPROVED";

    int N = scan.nextInt();
    for(int i=0;i<N;i++) {
    A.add(scan.nextInt());
    }

for(int j:A) {
	if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	}

}
    System.out.println(result);
  } main {
    Scanner scan = new Scanner(System.in);
    List<Integer> A = new ArrayList<Integer>();
    String result = "APPROVED";

    int N = scan.nextInt();
    for(int i=0;i<N;i++) {
    A.add(scan.nextInt());
    }

for(int j:A) {
	if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	}

}
    System.out.println(result);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) List<Integer> A = new ArrayList<Integer>(); A new ArrayList<Integer>() String result = "APPROVED"; result "APPROVED" int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan for(int i=0;i<N;i++) {
    A.add(scan.nextInt());
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
    A.add(scan.nextInt());
    } {
    A.add(scan.nextInt());
    } A.add(scan.nextInt()) A.add A scan.nextInt() scan.nextInt scan for(int j:A) {
	if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	}

} int j A {
	if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	}

} {
	if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	}

} if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	} j%2==0 j%2 j 2 0 {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	} if(j%3!=0 && j%5!=0){
		result = "DENIED";
		} j%3!=0 && j%5!=0 j%3!=0 j%3 j 3 0 j%5!=0 j%5 j 5 0 {
		result = "DENIED";
		} result = "DENIED" result "DENIED" System.out.println(result) System.out.println System.out System System.out result String args[] args public class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    List<Integer> A = new ArrayList<Integer>();
    String result = "APPROVED";

    int N = scan.nextInt();
    for(int i=0;i<N;i++) {
    A.add(scan.nextInt());
    }

for(int j:A) {
	if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	}

}
    System.out.println(result);
  }
} public class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    List<Integer> A = new ArrayList<Integer>();
    String result = "APPROVED";

    int N = scan.nextInt();
    for(int i=0;i<N;i++) {
    A.add(scan.nextInt());
    }

for(int j:A) {
	if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	}

}
    System.out.println(result);
  }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    List<Integer> A = new ArrayList<Integer>();
    String result = "APPROVED";

    int N = scan.nextInt();
    for(int i=0;i<N;i++) {
    A.add(scan.nextInt());
    }

for(int j:A) {
	if(j%2==0) {
		if(j%3!=0 && j%5!=0){
		result = "DENIED";
		}
	}

}
    System.out.println(result);
  }
}