import java.util.Scanner;

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

        String status = "APPROVED";
        for (int i = 0; i < n; i++) {
            int a = in.nextInt();
            if (a % 2 == 0 && !(a % 3 == 0 || a % 5 == 0)) {
                status = "DENIED";
            }
        }

        System.out.println(status);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        String status = "APPROVED";
        for (int i = 0; i < n; i++) {
            int a = in.nextInt();
            if (a % 2 == 0 && !(a % 3 == 0 || a % 5 == 0)) {
                status = "DENIED";
            }
        }

        System.out.println(status);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        String status = "APPROVED";
        for (int i = 0; i < n; i++) {
            int a = in.nextInt();
            if (a % 2 == 0 && !(a % 3 == 0 || a % 5 == 0)) {
                status = "DENIED";
            }
        }

        System.out.println(status);
    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        String status = "APPROVED";
        for (int i = 0; i < n; i++) {
            int a = in.nextInt();
            if (a % 2 == 0 && !(a % 3 == 0 || a % 5 == 0)) {
                status = "DENIED";
            }
        }

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

        String status = "APPROVED";
        for (int i = 0; i < n; i++) {
            int a = in.nextInt();
            if (a % 2 == 0 && !(a % 3 == 0 || a % 5 == 0)) {
                status = "DENIED";
            }
        }

        System.out.println(status);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        String status = "APPROVED";
        for (int i = 0; i < n; i++) {
            int a = in.nextInt();
            if (a % 2 == 0 && !(a % 3 == 0 || a % 5 == 0)) {
                status = "DENIED";
            }
        }

        System.out.println(status);
    }
} Main
import java.util.Scanner;

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

        String status = "APPROVED";
        for (int i = 0; i < n; i++) {
            int a = in.nextInt();
            if (a % 2 == 0 && !(a % 3 == 0 || a % 5 == 0)) {
                status = "DENIED";
            }
        }

        System.out.println(status);
    }
}
