import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int x[] = new int[n];

    for(int i = 0; i < n; i ++){
      x[i] = scan.nextInt();
    }

    String answer = "APPROVED";

    for(int i = 0; i < n; i ++){
      if(x[i] % 2 ==0){
        if(x[i] % 3 != 0 && x[i] % 5 != 0){
          answer = "DENIED";
        }
      }
    }
    System.out.println(answer);
    }
  } import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int x[] = new int[n];

    for(int i = 0; i < n; i ++){
      x[i] = scan.nextInt();
    }

    String answer = "APPROVED";

    for(int i = 0; i < n; i ++){
      if(x[i] % 2 ==0){
        if(x[i] % 3 != 0 && x[i] % 5 != 0){
          answer = "DENIED";
        }
      }
    }
    System.out.println(answer);
    }
  } Main public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int x[] = new int[n];

    for(int i = 0; i < n; i ++){
      x[i] = scan.nextInt();
    }

    String answer = "APPROVED";

    for(int i = 0; i < n; i ++){
      if(x[i] % 2 ==0){
        if(x[i] % 3 != 0 && x[i] % 5 != 0){
          answer = "DENIED";
        }
      }
    }
    System.out.println(answer);
    } main {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int x[] = new int[n];

    for(int i = 0; i < n; i ++){
      x[i] = scan.nextInt();
    }

    String answer = "APPROVED";

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

    for(int i = 0; i < n; i ++){
      x[i] = scan.nextInt();
    }

    String answer = "APPROVED";

    for(int i = 0; i < n; i ++){
      if(x[i] % 2 ==0){
        if(x[i] % 3 != 0 && x[i] % 5 != 0){
          answer = "DENIED";
        }
      }
    }
    System.out.println(answer);
    }
  } public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int x[] = new int[n];

    for(int i = 0; i < n; i ++){
      x[i] = scan.nextInt();
    }

    String answer = "APPROVED";

    for(int i = 0; i < n; i ++){
      if(x[i] % 2 ==0){
        if(x[i] % 3 != 0 && x[i] % 5 != 0){
          answer = "DENIED";
        }
      }
    }
    System.out.println(answer);
    }
  } Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int x[] = new int[n];

    for(int i = 0; i < n; i ++){
      x[i] = scan.nextInt();
    }

    String answer = "APPROVED";

    for(int i = 0; i < n; i ++){
      if(x[i] % 2 ==0){
        if(x[i] % 3 != 0 && x[i] % 5 != 0){
          answer = "DENIED";
        }
      }
    }
    System.out.println(answer);
    }
  }