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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean isOK = true;
        ArrayList<Integer> list = new ArrayList<Integer>();
        for(int i = 1; i <= n; i++) {
            int checking = sc.nextInt();
            if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            }
        }
        if (isOK) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean isOK = true;
        ArrayList<Integer> list = new ArrayList<Integer>();
        for(int i = 1; i <= n; i++) {
            int checking = sc.nextInt();
            if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            }
        }
        if (isOK) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean isOK = true;
        ArrayList<Integer> list = new ArrayList<Integer>();
        for(int i = 1; i <= n; i++) {
            int checking = sc.nextInt();
            if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            }
        }
        if (isOK) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean isOK = true;
        ArrayList<Integer> list = new ArrayList<Integer>();
        for(int i = 1; i <= n; i++) {
            int checking = sc.nextInt();
            if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            }
        }
        if (isOK) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean isOK = true; isOK true ArrayList<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() for(int i = 1; i <= n; i++) {
            int checking = sc.nextInt();
            if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            int checking = sc.nextInt();
            if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            }
        } {
            int checking = sc.nextInt();
            if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            }
        } int checking = sc.nextInt(); checking sc.nextInt() sc.nextInt sc if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            } checking % 2 == 0 checking % 2 checking 2 0 {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            } if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                } !((checking % 3 == 0)||(checking % 5 == 0)) ((checking % 3 == 0)||(checking % 5 == 0)) (checking % 3 == 0) checking % 3 checking 3 0 (checking % 5 == 0) checking % 5 checking 5 0 {
                    isOK = false;
                } isOK = false isOK false if (isOK) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        } isOK {
            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 n = sc.nextInt();
        boolean isOK = true;
        ArrayList<Integer> list = new ArrayList<Integer>();
        for(int i = 1; i <= n; i++) {
            int checking = sc.nextInt();
            if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            }
        }
        if (isOK) {
            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 n = sc.nextInt();
        boolean isOK = true;
        ArrayList<Integer> list = new ArrayList<Integer>();
        for(int i = 1; i <= n; i++) {
            int checking = sc.nextInt();
            if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            }
        }
        if (isOK) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
} Main
import java.util.Scanner;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean isOK = true;
        ArrayList<Integer> list = new ArrayList<Integer>();
        for(int i = 1; i <= n; i++) {
            int checking = sc.nextInt();
            if (checking % 2 == 0) {
                if (!((checking % 3 == 0)||(checking % 5 == 0))) {
                    isOK = false;
                }
            }
        }
        if (isOK) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
}