import java.util.Scanner;

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

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