import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        boolean isApproved = true;
        int n = sc.nextInt();
        int[] intArray = new int[n];
        for(int i = 0; i < n; i++) intArray[i] = Integer.parseInt(sc.next());
        for(int num : intArray) {
            if(num % 2 == 0) {
                if(num % 3 != 0 && num % 5 != 0) isApproved = false;
            }
        }

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

        System.out.println(isApproved ? "APPROVED" : "DENIED");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        boolean isApproved = true;
        int n = sc.nextInt();
        int[] intArray = new int[n];
        for(int i = 0; i < n; i++) intArray[i] = Integer.parseInt(sc.next());
        for(int num : intArray) {
            if(num % 2 == 0) {
                if(num % 3 != 0 && num % 5 != 0) isApproved = false;
            }
        }

        System.out.println(isApproved ? "APPROVED" : "DENIED");
    } main {
        Scanner sc = new Scanner(System.in);
        boolean isApproved = true;
        int n = sc.nextInt();
        int[] intArray = new int[n];
        for(int i = 0; i < n; i++) intArray[i] = Integer.parseInt(sc.next());
        for(int num : intArray) {
            if(num % 2 == 0) {
                if(num % 3 != 0 && num % 5 != 0) isApproved = false;
            }
        }

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

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

        System.out.println(isApproved ? "APPROVED" : "DENIED");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        boolean isApproved = true;
        int n = sc.nextInt();
        int[] intArray = new int[n];
        for(int i = 0; i < n; i++) intArray[i] = Integer.parseInt(sc.next());
        for(int num : intArray) {
            if(num % 2 == 0) {
                if(num % 3 != 0 && num % 5 != 0) isApproved = false;
            }
        }

        System.out.println(isApproved ? "APPROVED" : "DENIED");
    }
}
