import java.util.*;
import java.lang.String;
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner (System.in);
    int n = sc.nextInt(); 
    sc.nextLine();
    String str = sc.nextLine(); // 6 7 9 10 31
    
    String[] arr = str.split(" ");
    for (String a : arr) {
      int i = Integer.parseInt(a);
      if (i % 2 == 0 && (i % 3 != 0 && i%5 != 0)) {
          System.out.println("DENIED");
          return;
      }
    }
    System.out.println("APPROVED");
  }
} import java.util.*; util.* java import java.lang.String; String java.lang class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner (System.in);
    int n = sc.nextInt(); 
    sc.nextLine();
    String str = sc.nextLine(); // 6 7 9 10 31
    
    String[] arr = str.split(" ");
    for (String a : arr) {
      int i = Integer.parseInt(a);
      if (i % 2 == 0 && (i % 3 != 0 && i%5 != 0)) {
          System.out.println("DENIED");
          return;
      }
    }
    System.out.println("APPROVED");
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner (System.in);
    int n = sc.nextInt(); 
    sc.nextLine();
    String str = sc.nextLine(); // 6 7 9 10 31
    
    String[] arr = str.split(" ");
    for (String a : arr) {
      int i = Integer.parseInt(a);
      if (i % 2 == 0 && (i % 3 != 0 && i%5 != 0)) {
          System.out.println("DENIED");
          return;
      }
    }
    System.out.println("APPROVED");
  } main {
    Scanner sc = new Scanner (System.in);
    int n = sc.nextInt(); 
    sc.nextLine();
    String str = sc.nextLine(); // 6 7 9 10 31
    
    String[] arr = str.split(" ");
    for (String a : arr) {
      int i = Integer.parseInt(a);
      if (i % 2 == 0 && (i % 3 != 0 && i%5 != 0)) {
          System.out.println("DENIED");
          return;
      }
    }
    System.out.println("APPROVED");
  } Scanner sc = new Scanner (System.in); sc new Scanner (System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc String[] arr = str.split(" "); arr str.split(" ") str.split str " " for (String a : arr) {
      int i = Integer.parseInt(a);
      if (i % 2 == 0 && (i % 3 != 0 && i%5 != 0)) {
          System.out.println("DENIED");
          return;
      }
    } String a arr {
      int i = Integer.parseInt(a);
      if (i % 2 == 0 && (i % 3 != 0 && i%5 != 0)) {
          System.out.println("DENIED");
          return;
      }
    } {
      int i = Integer.parseInt(a);
      if (i % 2 == 0 && (i % 3 != 0 && i%5 != 0)) {
          System.out.println("DENIED");
          return;
      }
    } int i = Integer.parseInt(a); i Integer.parseInt(a) Integer.parseInt Integer a if (i % 2 == 0 && (i % 3 != 0 && i%5 != 0)) {
          System.out.println("DENIED");
          return;
      } i % 2 == 0 && (i % 3 != 0 && i%5 != 0) i % 2 == 0 i % 2 i 2 0 (i % 3 != 0 && i%5 != 0) i % 3 != 0 i % 3 i 3 0 i%5 != 0 i%5 i 5 0 {
          System.out.println("DENIED");
          return;
      } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" return; System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" String[] args args
import java.util.*;
import java.lang.String;
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner (System.in);
    int n = sc.nextInt(); 
    sc.nextLine();
    String str = sc.nextLine(); // 6 7 9 10 31
    
    String[] arr = str.split(" ");
    for (String a : arr) {
      int i = Integer.parseInt(a);
      if (i % 2 == 0 && (i % 3 != 0 && i%5 != 0)) {
          System.out.println("DENIED");
          return;
      }
    }
    System.out.println("APPROVED");
  }
}