import java.io.*;
import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    while (0 < N) {
      int n = in.nextInt();
      if (n % 2 == 0 && (n % 3 != 0 && n % 5 != 0)) break;
      N--;
    }
    System.out.println(0 < N ? "DENIED" : "APPROVED");
  }
} import java.io.*; io.* java import java.util.*; util.* java class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    while (0 < N) {
      int n = in.nextInt();
      if (n % 2 == 0 && (n % 3 != 0 && n % 5 != 0)) break;
      N--;
    }
    System.out.println(0 < N ? "DENIED" : "APPROVED");
  }
} Main public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    while (0 < N) {
      int n = in.nextInt();
      if (n % 2 == 0 && (n % 3 != 0 && n % 5 != 0)) break;
      N--;
    }
    System.out.println(0 < N ? "DENIED" : "APPROVED");
  } main {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    while (0 < N) {
      int n = in.nextInt();
      if (n % 2 == 0 && (n % 3 != 0 && n % 5 != 0)) break;
      N--;
    }
    System.out.println(0 < N ? "DENIED" : "APPROVED");
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in while (0 < N) {
      int n = in.nextInt();
      if (n % 2 == 0 && (n % 3 != 0 && n % 5 != 0)) break;
      N--;
    } 0 < N 0 N {
      int n = in.nextInt();
      if (n % 2 == 0 && (n % 3 != 0 && n % 5 != 0)) break;
      N--;
    } int n = in.nextInt(); n in.nextInt() in.nextInt in if (n % 2 == 0 && (n % 3 != 0 && n % 5 != 0)) break; n % 2 == 0 && (n % 3 != 0 && n % 5 != 0) n % 2 == 0 n % 2 n 2 0 (n % 3 != 0 && n % 5 != 0) n % 3 != 0 n % 3 n 3 0 n % 5 != 0 n % 5 n 5 0 break; N-- N System.out.println(0 < N ? "DENIED" : "APPROVED") System.out.println System.out System System.out 0 < N ? "DENIED" : "APPROVED" 0 < N 0 N "DENIED" "APPROVED" String[] args args
import java.io.*;
import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    while (0 < N) {
      int n = in.nextInt();
      if (n % 2 == 0 && (n % 3 != 0 && n % 5 != 0)) break;
      N--;
    }
    System.out.println(0 < N ? "DENIED" : "APPROVED");
  }
}