import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    boolean ok = true;
    for (int i = 0; i < n; i++) {
      int t = in.nextInt();
      if (t % 2 == 0 && !(t % 3 == 0 || t % 5 == 0)) {
        ok &= false;
      }
    }
    System.out.println(ok ? "APPROVED" : "DENIED");
  }
} import java.util.*; util.* java class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    boolean ok = true;
    for (int i = 0; i < n; i++) {
      int t = in.nextInt();
      if (t % 2 == 0 && !(t % 3 == 0 || t % 5 == 0)) {
        ok &= false;
      }
    }
    System.out.println(ok ? "APPROVED" : "DENIED");
  }
} Main public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    boolean ok = true;
    for (int i = 0; i < n; i++) {
      int t = in.nextInt();
      if (t % 2 == 0 && !(t % 3 == 0 || t % 5 == 0)) {
        ok &= false;
      }
    }
    System.out.println(ok ? "APPROVED" : "DENIED");
  } main {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    boolean ok = true;
    for (int i = 0; i < n; i++) {
      int t = in.nextInt();
      if (t % 2 == 0 && !(t % 3 == 0 || t % 5 == 0)) {
        ok &= false;
      }
    }
    System.out.println(ok ? "APPROVED" : "DENIED");
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in boolean ok = true; ok true for (int i = 0; i < n; i++) {
      int t = in.nextInt();
      if (t % 2 == 0 && !(t % 3 == 0 || t % 5 == 0)) {
        ok &= false;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int t = in.nextInt();
      if (t % 2 == 0 && !(t % 3 == 0 || t % 5 == 0)) {
        ok &= false;
      }
    } {
      int t = in.nextInt();
      if (t % 2 == 0 && !(t % 3 == 0 || t % 5 == 0)) {
        ok &= false;
      }
    } int t = in.nextInt(); t in.nextInt() in.nextInt in if (t % 2 == 0 && !(t % 3 == 0 || t % 5 == 0)) {
        ok &= false;
      } t % 2 == 0 && !(t % 3 == 0 || t % 5 == 0) t % 2 == 0 t % 2 t 2 0 !(t % 3 == 0 || t % 5 == 0) (t % 3 == 0 || t % 5 == 0) t % 3 == 0 t % 3 t 3 0 t % 5 == 0 t % 5 t 5 0 {
        ok &= false;
      } ok &= false ok false System.out.println(ok ? "APPROVED" : "DENIED") System.out.println System.out System System.out ok ? "APPROVED" : "DENIED" ok "APPROVED" "DENIED" String[] args args
import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    boolean ok = true;
    for (int i = 0; i < n; i++) {
      int t = in.nextInt();
      if (t % 2 == 0 && !(t % 3 == 0 || t % 5 == 0)) {
        ok &= false;
      }
    }
    System.out.println(ok ? "APPROVED" : "DENIED");
  }
}
