import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        for (int i = 0; i < n; i++) {
            int temp = Integer.parseInt(sc.next());
            if (temp % 2 == 0) {
                if (temp % 5 != 0 && temp % 3 != 0) {
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        System.out.println("APPROVED");
    }
} import java.util.Scanner; Scanner java.util public class Main {

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

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        for (int i = 0; i < n; i++) {
            int temp = Integer.parseInt(sc.next());
            if (temp % 2 == 0) {
                if (temp % 5 != 0 && temp % 3 != 0) {
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        System.out.println("APPROVED");
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        for (int i = 0; i < n; i++) {
            int temp = Integer.parseInt(sc.next());
            if (temp % 2 == 0) {
                if (temp % 5 != 0 && temp % 3 != 0) {
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        System.out.println("APPROVED");
    }
}