import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String answer = "APPROVED";

        for (int i = 0; i < n; i++){
            int a = scanner.nextInt();
            if (a%2 == 0){
                if (a%3 != 0 && a%5 != 0){
                    answer = "DENIED";
                    break;
                }
            }
        }
        System.out.println(answer);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String answer = "APPROVED";

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

        for (int i = 0; i < n; i++){
            int a = scanner.nextInt();
            if (a%2 == 0){
                if (a%3 != 0 && a%5 != 0){
                    answer = "DENIED";
                    break;
                }
            }
        }
        System.out.println(answer);
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String answer = "APPROVED";

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

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

        for (int i = 0; i < n; i++){
            int a = scanner.nextInt();
            if (a%2 == 0){
                if (a%3 != 0 && a%5 != 0){
                    answer = "DENIED";
                    break;
                }
            }
        }
        System.out.println(answer);
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String answer = "APPROVED";

        for (int i = 0; i < n; i++){
            int a = scanner.nextInt();
            if (a%2 == 0){
                if (a%3 != 0 && a%5 != 0){
                    answer = "DENIED";
                    break;
                }
            }
        }
        System.out.println(answer);
    }
}