import java.util.Scanner;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) throws Exception {

        // 入力データの準備
        Scanner scanner = new Scanner(System.in);
        String inputCountData = scanner.nextLine();
        String inputCheckNumberData = scanner.nextLine();
        scanner.close();

        // 入力された整数の個数を取得
        int count = Integer.parseInt(inputCountData);

        // 入力整数のチェック
        // int型への変換
        boolean checkFlag = true;
        if (count == 1) {
            int checkNumber = Integer.parseInt(inputCheckNumberData);
            if (checkNumber % 2 == 0) {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            }
        } else {
            ArrayList<Integer> checkNumberList = new ArrayList<>();
            String[] editedInputCheckNumberData = inputCheckNumberData.split(" ");
            for (int cnt = 0; cnt < editedInputCheckNumberData.length; cnt++) {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            }

            // 値のチェック
            for (int inputNumber : checkNumberList) {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            }
        }

        // 判定結果の出力
        if (checkFlag) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    }

} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) throws Exception {

        // 入力データの準備
        Scanner scanner = new Scanner(System.in);
        String inputCountData = scanner.nextLine();
        String inputCheckNumberData = scanner.nextLine();
        scanner.close();

        // 入力された整数の個数を取得
        int count = Integer.parseInt(inputCountData);

        // 入力整数のチェック
        // int型への変換
        boolean checkFlag = true;
        if (count == 1) {
            int checkNumber = Integer.parseInt(inputCheckNumberData);
            if (checkNumber % 2 == 0) {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            }
        } else {
            ArrayList<Integer> checkNumberList = new ArrayList<>();
            String[] editedInputCheckNumberData = inputCheckNumberData.split(" ");
            for (int cnt = 0; cnt < editedInputCheckNumberData.length; cnt++) {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            }

            // 値のチェック
            for (int inputNumber : checkNumberList) {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            }
        }

        // 判定結果の出力
        if (checkFlag) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    }

} Main public static void main(String[] args) throws Exception {

        // 入力データの準備
        Scanner scanner = new Scanner(System.in);
        String inputCountData = scanner.nextLine();
        String inputCheckNumberData = scanner.nextLine();
        scanner.close();

        // 入力された整数の個数を取得
        int count = Integer.parseInt(inputCountData);

        // 入力整数のチェック
        // int型への変換
        boolean checkFlag = true;
        if (count == 1) {
            int checkNumber = Integer.parseInt(inputCheckNumberData);
            if (checkNumber % 2 == 0) {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            }
        } else {
            ArrayList<Integer> checkNumberList = new ArrayList<>();
            String[] editedInputCheckNumberData = inputCheckNumberData.split(" ");
            for (int cnt = 0; cnt < editedInputCheckNumberData.length; cnt++) {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            }

            // 値のチェック
            for (int inputNumber : checkNumberList) {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            }
        }

        // 判定結果の出力
        if (checkFlag) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    } main {

        // 入力データの準備
        Scanner scanner = new Scanner(System.in);
        String inputCountData = scanner.nextLine();
        String inputCheckNumberData = scanner.nextLine();
        scanner.close();

        // 入力された整数の個数を取得
        int count = Integer.parseInt(inputCountData);

        // 入力整数のチェック
        // int型への変換
        boolean checkFlag = true;
        if (count == 1) {
            int checkNumber = Integer.parseInt(inputCheckNumberData);
            if (checkNumber % 2 == 0) {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            }
        } else {
            ArrayList<Integer> checkNumberList = new ArrayList<>();
            String[] editedInputCheckNumberData = inputCheckNumberData.split(" ");
            for (int cnt = 0; cnt < editedInputCheckNumberData.length; cnt++) {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            }

            // 値のチェック
            for (int inputNumber : checkNumberList) {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            }
        }

        // 判定結果の出力
        if (checkFlag) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String inputCountData = scanner.nextLine(); inputCountData scanner.nextLine() scanner.nextLine scanner String inputCheckNumberData = scanner.nextLine(); inputCheckNumberData scanner.nextLine() scanner.nextLine scanner scanner.close() scanner.close scanner int count = Integer.parseInt(inputCountData); count Integer.parseInt(inputCountData) Integer.parseInt Integer inputCountData boolean checkFlag = true; checkFlag true if (count == 1) {
            int checkNumber = Integer.parseInt(inputCheckNumberData);
            if (checkNumber % 2 == 0) {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            }
        } else {
            ArrayList<Integer> checkNumberList = new ArrayList<>();
            String[] editedInputCheckNumberData = inputCheckNumberData.split(" ");
            for (int cnt = 0; cnt < editedInputCheckNumberData.length; cnt++) {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            }

            // 値のチェック
            for (int inputNumber : checkNumberList) {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            }
        } count == 1 count 1 {
            int checkNumber = Integer.parseInt(inputCheckNumberData);
            if (checkNumber % 2 == 0) {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            }
        } int checkNumber = Integer.parseInt(inputCheckNumberData); checkNumber Integer.parseInt(inputCheckNumberData) Integer.parseInt Integer inputCheckNumberData if (checkNumber % 2 == 0) {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            } checkNumber % 2 == 0 checkNumber % 2 checkNumber 2 0 {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            } if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                } checkNumber % 3 == 0 || checkNumber % 5 == 0 checkNumber % 3 == 0 checkNumber % 3 checkNumber 3 0 checkNumber % 5 == 0 checkNumber % 5 checkNumber 5 0 {
                    checkFlag = true;
                } checkFlag = true checkFlag true {
                    checkFlag = false;
                } checkFlag = false checkFlag false {
            ArrayList<Integer> checkNumberList = new ArrayList<>();
            String[] editedInputCheckNumberData = inputCheckNumberData.split(" ");
            for (int cnt = 0; cnt < editedInputCheckNumberData.length; cnt++) {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            }

            // 値のチェック
            for (int inputNumber : checkNumberList) {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            }
        } ArrayList<Integer> checkNumberList = new ArrayList<>(); checkNumberList new ArrayList<>() String[] editedInputCheckNumberData = inputCheckNumberData.split(" "); editedInputCheckNumberData inputCheckNumberData.split(" ") inputCheckNumberData.split inputCheckNumberData " " for (int cnt = 0; cnt < editedInputCheckNumberData.length; cnt++) {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            } int cnt = 0; int cnt = 0; cnt 0 cnt < editedInputCheckNumberData.length cnt editedInputCheckNumberData.length editedInputCheckNumberData editedInputCheckNumberData.length cnt++ cnt++ cnt {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            } {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            } int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]); checkNumber Integer.parseInt(editedInputCheckNumberData[cnt]) Integer.parseInt Integer editedInputCheckNumberData[cnt] editedInputCheckNumberData cnt checkNumberList.add(checkNumber) checkNumberList.add checkNumberList checkNumber for (int inputNumber : checkNumberList) {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            } int inputNumber checkNumberList {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            } {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            } if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                } inputNumber % 2 == 0 inputNumber % 2 inputNumber 2 0 {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                } if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    } inputNumber % 3 == 0 || inputNumber % 5 == 0 inputNumber % 3 == 0 inputNumber % 3 inputNumber 3 0 inputNumber % 5 == 0 inputNumber % 5 inputNumber 5 0 {
                        checkFlag = true;
                    } checkFlag = true checkFlag true {
                        checkFlag = false;
                        break;
                    } checkFlag = false checkFlag false break; if (checkFlag) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        } checkFlag {
            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) throws Exception {

        // 入力データの準備
        Scanner scanner = new Scanner(System.in);
        String inputCountData = scanner.nextLine();
        String inputCheckNumberData = scanner.nextLine();
        scanner.close();

        // 入力された整数の個数を取得
        int count = Integer.parseInt(inputCountData);

        // 入力整数のチェック
        // int型への変換
        boolean checkFlag = true;
        if (count == 1) {
            int checkNumber = Integer.parseInt(inputCheckNumberData);
            if (checkNumber % 2 == 0) {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            }
        } else {
            ArrayList<Integer> checkNumberList = new ArrayList<>();
            String[] editedInputCheckNumberData = inputCheckNumberData.split(" ");
            for (int cnt = 0; cnt < editedInputCheckNumberData.length; cnt++) {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            }

            // 値のチェック
            for (int inputNumber : checkNumberList) {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            }
        }

        // 判定結果の出力
        if (checkFlag) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    }

} public class Main {
    public static void main(String[] args) throws Exception {

        // 入力データの準備
        Scanner scanner = new Scanner(System.in);
        String inputCountData = scanner.nextLine();
        String inputCheckNumberData = scanner.nextLine();
        scanner.close();

        // 入力された整数の個数を取得
        int count = Integer.parseInt(inputCountData);

        // 入力整数のチェック
        // int型への変換
        boolean checkFlag = true;
        if (count == 1) {
            int checkNumber = Integer.parseInt(inputCheckNumberData);
            if (checkNumber % 2 == 0) {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            }
        } else {
            ArrayList<Integer> checkNumberList = new ArrayList<>();
            String[] editedInputCheckNumberData = inputCheckNumberData.split(" ");
            for (int cnt = 0; cnt < editedInputCheckNumberData.length; cnt++) {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            }

            // 値のチェック
            for (int inputNumber : checkNumberList) {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            }
        }

        // 判定結果の出力
        if (checkFlag) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    }

} Main
import java.util.Scanner;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) throws Exception {

        // 入力データの準備
        Scanner scanner = new Scanner(System.in);
        String inputCountData = scanner.nextLine();
        String inputCheckNumberData = scanner.nextLine();
        scanner.close();

        // 入力された整数の個数を取得
        int count = Integer.parseInt(inputCountData);

        // 入力整数のチェック
        // int型への変換
        boolean checkFlag = true;
        if (count == 1) {
            int checkNumber = Integer.parseInt(inputCheckNumberData);
            if (checkNumber % 2 == 0) {
                if (checkNumber % 3 == 0 || checkNumber % 5 == 0) {
                    checkFlag = true;
                } else {
                    checkFlag = false;
                }
            }
        } else {
            ArrayList<Integer> checkNumberList = new ArrayList<>();
            String[] editedInputCheckNumberData = inputCheckNumberData.split(" ");
            for (int cnt = 0; cnt < editedInputCheckNumberData.length; cnt++) {
                int checkNumber = Integer.parseInt(editedInputCheckNumberData[cnt]);
                checkNumberList.add(checkNumber);
            }

            // 値のチェック
            for (int inputNumber : checkNumberList) {
                if (inputNumber % 2 == 0) {
                    if (inputNumber % 3 == 0 || inputNumber % 5 == 0) {
                        checkFlag = true;
                    } else {
                        checkFlag = false;
                        break;
                    }
                }
            }
        }

        // 判定結果の出力
        if (checkFlag) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }

    }

}