import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N = keyboard.nextInt();
		
		String ans = "APPROVED";
		for(int a = 0; a<N; a++) {
			int Ain = keyboard.nextInt();
			if(Ain%2 == 0) {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			}
		}
			
		System.out.println(ans);
		keyboard.close();	
	}
} import java.util.*; util.* java public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N = keyboard.nextInt();
		
		String ans = "APPROVED";
		for(int a = 0; a<N; a++) {
			int Ain = keyboard.nextInt();
			if(Ain%2 == 0) {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			}
		}
			
		System.out.println(ans);
		keyboard.close();	
	}
} Main public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N = keyboard.nextInt();
		
		String ans = "APPROVED";
		for(int a = 0; a<N; a++) {
			int Ain = keyboard.nextInt();
			if(Ain%2 == 0) {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			}
		}
			
		System.out.println(ans);
		keyboard.close();	
	} main {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N = keyboard.nextInt();
		
		String ans = "APPROVED";
		for(int a = 0; a<N; a++) {
			int Ain = keyboard.nextInt();
			if(Ain%2 == 0) {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			}
		}
			
		System.out.println(ans);
		keyboard.close();	
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) int N = keyboard.nextInt(); N keyboard.nextInt() keyboard.nextInt keyboard String ans = "APPROVED"; ans "APPROVED" for(int a = 0; a<N; a++) {
			int Ain = keyboard.nextInt();
			if(Ain%2 == 0) {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			}
		} int a = 0; int a = 0; a 0 a<N a N a++ a++ a {
			int Ain = keyboard.nextInt();
			if(Ain%2 == 0) {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			}
		} {
			int Ain = keyboard.nextInt();
			if(Ain%2 == 0) {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			}
		} int Ain = keyboard.nextInt(); Ain keyboard.nextInt() keyboard.nextInt keyboard if(Ain%2 == 0) {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			} Ain%2 == 0 Ain%2 Ain 2 0 {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			} if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				} Ain%3 != 0 && Ain%5 != 0 Ain%3 != 0 Ain%3 Ain 3 0 Ain%5 != 0 Ain%5 Ain 5 0 {
					ans = "DENIED";
				} ans = "DENIED" ans "DENIED" System.out.println(ans) System.out.println System.out System System.out ans keyboard.close() keyboard.close keyboard String[] args args public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N = keyboard.nextInt();
		
		String ans = "APPROVED";
		for(int a = 0; a<N; a++) {
			int Ain = keyboard.nextInt();
			if(Ain%2 == 0) {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			}
		}
			
		System.out.println(ans);
		keyboard.close();	
	}
} public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N = keyboard.nextInt();
		
		String ans = "APPROVED";
		for(int a = 0; a<N; a++) {
			int Ain = keyboard.nextInt();
			if(Ain%2 == 0) {
				if(Ain%3 != 0 && Ain%5 != 0) {
					ans = "DENIED";
				}
			}
		}
			
		System.out.println(ans);
		keyboard.close();	
	}
} Main
import java.util.*;

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