import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextInt();
        }
        boolean flag = true;
        for (int i = 0; i < n; i++) {
            if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            }
        }
        System.out.println(flag ? "APPROVED" : "DENIED");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextInt();
        }
        boolean flag = true;
        for (int i = 0; i < n; i++) {
            if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            }
        }
        System.out.println(flag ? "APPROVED" : "DENIED");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextInt();
        }
        boolean flag = true;
        for (int i = 0; i < n; i++) {
            if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            }
        }
        System.out.println(flag ? "APPROVED" : "DENIED");
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextInt();
        }
        boolean flag = true;
        for (int i = 0; i < n; i++) {
            if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            }
        }
        System.out.println(flag ? "APPROVED" : "DENIED");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] nums = new int[n]; nums new int[n] n for (int i = 0; i < n; i++) {
            nums[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            nums[i] = sc.nextInt();
        } {
            nums[i] = sc.nextInt();
        } nums[i] = sc.nextInt() nums[i] nums i sc.nextInt() sc.nextInt sc boolean flag = true; flag true for (int i = 0; i < n; i++) {
            if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            }
        } {
            if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            }
        } if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            } nums[i] % 2 == 0 nums[i] % 2 nums[i] nums i 2 0 {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            } if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                } !(nums[i] % 3 == 0 || nums[i] % 5 == 0) (nums[i] % 3 == 0 || nums[i] % 5 == 0) nums[i] % 3 == 0 nums[i] % 3 nums[i] nums i 3 0 nums[i] % 5 == 0 nums[i] % 5 nums[i] nums i 5 0 {
                    flag = false;
                    break;
                } flag = false flag false break; System.out.println(flag ? "APPROVED" : "DENIED") System.out.println System.out System System.out flag ? "APPROVED" : "DENIED" flag "APPROVED" "DENIED" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextInt();
        }
        boolean flag = true;
        for (int i = 0; i < n; i++) {
            if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            }
        }
        System.out.println(flag ? "APPROVED" : "DENIED");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextInt();
        }
        boolean flag = true;
        for (int i = 0; i < n; i++) {
            if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            }
        }
        System.out.println(flag ? "APPROVED" : "DENIED");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextInt();
        }
        boolean flag = true;
        for (int i = 0; i < n; i++) {
            if (nums[i] % 2 == 0) {
                if (!(nums[i] % 3 == 0 || nums[i] % 5 == 0)) {
                    flag = false;
                    break;
                }
            }
        }
        System.out.println(flag ? "APPROVED" : "DENIED");
    }
}