import java.util.*;

public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int n = Integer.parseInt(sc.next());
        String ans = "APPROVED";
        for(int i = 0; i < n; ++i) {
            int tmp = Integer.parseInt(sc.next());
            if(tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0) {
                ans = "DENIED";
            }
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int n = Integer.parseInt(sc.next());
        String ans = "APPROVED";
        for(int i = 0; i < n; ++i) {
            int tmp = Integer.parseInt(sc.next());
            if(tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0) {
                ans = "DENIED";
            }
        }
        System.out.println(ans);
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        int n = Integer.parseInt(sc.next());
        String ans = "APPROVED";
        for(int i = 0; i < n; ++i) {
            int tmp = Integer.parseInt(sc.next());
            if(tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0) {
                ans = "DENIED";
            }
        }
        System.out.println(ans);
    } main {
        int n = Integer.parseInt(sc.next());
        String ans = "APPROVED";
        for(int i = 0; i < n; ++i) {
            int tmp = Integer.parseInt(sc.next());
            if(tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0) {
                ans = "DENIED";
            }
        }
        System.out.println(ans);
    } int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String ans = "APPROVED"; ans "APPROVED" for(int i = 0; i < n; ++i) {
            int tmp = Integer.parseInt(sc.next());
            if(tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0) {
                ans = "DENIED";
            }
        } int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
            int tmp = Integer.parseInt(sc.next());
            if(tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0) {
                ans = "DENIED";
            }
        } {
            int tmp = Integer.parseInt(sc.next());
            if(tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0) {
                ans = "DENIED";
            }
        } int tmp = Integer.parseInt(sc.next()); tmp Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0) {
                ans = "DENIED";
            } tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0 tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0 tmp % 2 == 0 tmp % 2 tmp 2 0 tmp % 3 != 0 tmp % 3 tmp 3 0 tmp % 5 != 0 tmp % 5 tmp 5 0 {
                ans = "DENIED";
            } ans = "DENIED" ans "DENIED" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int n = Integer.parseInt(sc.next());
        String ans = "APPROVED";
        for(int i = 0; i < n; ++i) {
            int tmp = Integer.parseInt(sc.next());
            if(tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0) {
                ans = "DENIED";
            }
        }
        System.out.println(ans);
    }
} public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int n = Integer.parseInt(sc.next());
        String ans = "APPROVED";
        for(int i = 0; i < n; ++i) {
            int tmp = Integer.parseInt(sc.next());
            if(tmp % 2 == 0 && tmp % 3 != 0 && tmp % 5 != 0) {
                ans = "DENIED";
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.*;

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