import java.util.Map;
import java.util.Objects;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String[] arr = sc.nextLine().split(" ");
        sc.close();

        boolean isOk = true;

        for (int i = 0; i < N; i++) {
            int val = Integer.parseInt(arr[i]);
            if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            }
        }

        if (isOk) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    }

} import java.util.Map; Map java.util import java.util.Objects; Objects java.util import java.util.Scanner; Scanner java.util import java.util.stream.Collectors; Collectors java.util.stream import java.util.Arrays; Arrays java.util import java.util.HashMap; HashMap java.util import java.util.List; List java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String[] arr = sc.nextLine().split(" ");
        sc.close();

        boolean isOk = true;

        for (int i = 0; i < N; i++) {
            int val = Integer.parseInt(arr[i]);
            if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            }
        }

        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 = Integer.parseInt(sc.nextLine());
        String[] arr = sc.nextLine().split(" ");
        sc.close();

        boolean isOk = true;

        for (int i = 0; i < N; i++) {
            int val = Integer.parseInt(arr[i]);
            if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            }
        }

        if (isOk) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String[] arr = sc.nextLine().split(" ");
        sc.close();

        boolean isOk = true;

        for (int i = 0; i < N; i++) {
            int val = Integer.parseInt(arr[i]);
            if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            }
        }

        if (isOk) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.nextLine()); N Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc String[] arr = sc.nextLine().split(" "); arr sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " sc.close() sc.close sc boolean isOk = true; isOk true for (int i = 0; i < N; i++) {
            int val = Integer.parseInt(arr[i]);
            if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int val = Integer.parseInt(arr[i]);
            if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            }
        } {
            int val = Integer.parseInt(arr[i]);
            if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            }
        } int val = Integer.parseInt(arr[i]); val Integer.parseInt(arr[i]) Integer.parseInt Integer arr[i] arr i if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            } val % 2 == 0 val % 2 val 2 0 {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                } val % 3 == 0 || val % 5 == 0 val % 3 == 0 val % 3 val 3 0 val % 5 == 0 val % 5 val 5 0 {
                    continue;
                } continue; {
                    isOk = false;
                    break;
                } isOk = false isOk false break; {
                continue;
            } continue; 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 = Integer.parseInt(sc.nextLine());
        String[] arr = sc.nextLine().split(" ");
        sc.close();

        boolean isOk = true;

        for (int i = 0; i < N; i++) {
            int val = Integer.parseInt(arr[i]);
            if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            }
        }

        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 = Integer.parseInt(sc.nextLine());
        String[] arr = sc.nextLine().split(" ");
        sc.close();

        boolean isOk = true;

        for (int i = 0; i < N; i++) {
            int val = Integer.parseInt(arr[i]);
            if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            }
        }

        if (isOk) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    }

} Main
import java.util.Map;
import java.util.Objects;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String[] arr = sc.nextLine().split(" ");
        sc.close();

        boolean isOk = true;

        for (int i = 0; i < N; i++) {
            int val = Integer.parseInt(arr[i]);
            if (val % 2 == 0) {
                if (val % 3 == 0 || val % 5 == 0) {
                    continue;
                } else {
                    isOk = false;
                    break;
                }
            } else {
                continue;
            }
        }

        if (isOk) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    }

}
