import java.util.Scanner;

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

        int num;
        boolean approved = true;
        num = cin.nextInt();

        int temp;
        for (int i = 0; i < num; i++) {
            temp = cin.nextInt();
            if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            }
        }

        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);

        int num;
        boolean approved = true;
        num = cin.nextInt();

        int temp;
        for (int i = 0; i < num; i++) {
            temp = cin.nextInt();
            if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            }
        }

        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} Main public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);

        int num;
        boolean approved = true;
        num = cin.nextInt();

        int temp;
        for (int i = 0; i < num; i++) {
            temp = cin.nextInt();
            if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            }
        }

        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    } main {
        Scanner cin = new Scanner(System.in);

        int num;
        boolean approved = true;
        num = cin.nextInt();

        int temp;
        for (int i = 0; i < num; i++) {
            temp = cin.nextInt();
            if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            }
        }

        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) int num; num boolean approved = true; approved true num = cin.nextInt() num cin.nextInt() cin.nextInt cin int temp; temp for (int i = 0; i < num; i++) {
            temp = cin.nextInt();
            if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            }
        } int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
            temp = cin.nextInt();
            if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            }
        } {
            temp = cin.nextInt();
            if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            }
        } temp = cin.nextInt() temp cin.nextInt() cin.nextInt cin if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            } temp % 2 == 0 temp % 2 temp 2 0 {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            } if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                } !(temp % 3 == 0 || temp % 5 == 0) (temp % 3 == 0 || temp % 5 == 0) temp % 3 == 0 temp % 3 temp 3 0 temp % 5 == 0 temp % 5 temp 5 0 {
                    approved = false;
                } approved = false approved false if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        } approved {
            System.out.println("APPROVED");
        } System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" {
            System.out.println("DENIED");
        } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);

        int num;
        boolean approved = true;
        num = cin.nextInt();

        int temp;
        for (int i = 0; i < num; i++) {
            temp = cin.nextInt();
            if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            }
        }

        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);

        int num;
        boolean approved = true;
        num = cin.nextInt();

        int temp;
        for (int i = 0; i < num; i++) {
            temp = cin.nextInt();
            if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            }
        }

        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} Main
import java.util.Scanner;

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

        int num;
        boolean approved = true;
        num = cin.nextInt();

        int temp;
        for (int i = 0; i < num; i++) {
            temp = cin.nextInt();
            if (temp % 2 == 0) {
                if (!(temp % 3 == 0 || temp % 5 == 0)) {
                    approved = false;
                }
            }
        }

        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
}
