import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int size = sc.nextInt();

        List<Integer> numbers = new ArrayList<>();

        for (int i = 0; i < size; i++) {
            numbers.add(sc.nextInt());
        }

        boolean approved = true;
        for (int i = 0; i < numbers.size(); i++) {
            if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            }
        }
        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int size = sc.nextInt();

        List<Integer> numbers = new ArrayList<>();

        for (int i = 0; i < size; i++) {
            numbers.add(sc.nextInt());
        }

        boolean approved = true;
        for (int i = 0; i < numbers.size(); i++) {
            if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            }
        }
        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int size = sc.nextInt();

        List<Integer> numbers = new ArrayList<>();

        for (int i = 0; i < size; i++) {
            numbers.add(sc.nextInt());
        }

        boolean approved = true;
        for (int i = 0; i < numbers.size(); i++) {
            if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            }
        }
        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    } main {

        Scanner sc = new Scanner(System.in);

        int size = sc.nextInt();

        List<Integer> numbers = new ArrayList<>();

        for (int i = 0; i < size; i++) {
            numbers.add(sc.nextInt());
        }

        boolean approved = true;
        for (int i = 0; i < numbers.size(); i++) {
            if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            }
        }
        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int size = sc.nextInt(); size sc.nextInt() sc.nextInt sc List<Integer> numbers = new ArrayList<>(); numbers new ArrayList<>() for (int i = 0; i < size; i++) {
            numbers.add(sc.nextInt());
        } int i = 0; int i = 0; i 0 i < size i size i++ i++ i {
            numbers.add(sc.nextInt());
        } {
            numbers.add(sc.nextInt());
        } numbers.add(sc.nextInt()) numbers.add numbers sc.nextInt() sc.nextInt sc boolean approved = true; approved true for (int i = 0; i < numbers.size(); i++) {
            if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            }
        } int i = 0; int i = 0; i 0 i < numbers.size() i numbers.size() numbers.size numbers i++ i++ i {
            if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            }
        } {
            if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            }
        } if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            } numbers.get(i) % 2 != 0 numbers.get(i) % 2 numbers.get(i) numbers.get numbers i 2 0 {
               // numbers.remove(i);
            } {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            } if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                } numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0 numbers.get(i) % 3 == 0 numbers.get(i) % 3 numbers.get(i) numbers.get numbers i 3 0 numbers.get(i) % 5 == 0 numbers.get(i) % 5 numbers.get(i) numbers.get numbers i 5 0 {
                    //System.out.println("APPROVED");
                } {
                    approved = false;
                    break;
                } approved = false approved false break; 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 sc = new Scanner(System.in);

        int size = sc.nextInt();

        List<Integer> numbers = new ArrayList<>();

        for (int i = 0; i < size; i++) {
            numbers.add(sc.nextInt());
        }

        boolean approved = true;
        for (int i = 0; i < numbers.size(); i++) {
            if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            }
        }
        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int size = sc.nextInt();

        List<Integer> numbers = new ArrayList<>();

        for (int i = 0; i < size; i++) {
            numbers.add(sc.nextInt());
        }

        boolean approved = true;
        for (int i = 0; i < numbers.size(); i++) {
            if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            }
        }
        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int size = sc.nextInt();

        List<Integer> numbers = new ArrayList<>();

        for (int i = 0; i < size; i++) {
            numbers.add(sc.nextInt());
        }

        boolean approved = true;
        for (int i = 0; i < numbers.size(); i++) {
            if (numbers.get(i) % 2 != 0) {
               // numbers.remove(i);
            } else {
                if (numbers.get(i) % 3 == 0 || numbers.get(i) % 5 == 0) {
                    //System.out.println("APPROVED");
                } else {
                    approved = false;
                    break;
                }
            }
        }
        if (approved) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
}