import java.util.Scanner;
import java.util.Arrays;
class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int PP[] = new int[N];
    for (int i = 0;i < N;i++) {
      PP[i] = scan.nextInt();
      if (PP[i] % 2 == 0) {
        if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        }
      }
    }
      System.out.println("APPROVED");
  }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int PP[] = new int[N];
    for (int i = 0;i < N;i++) {
      PP[i] = scan.nextInt();
      if (PP[i] % 2 == 0) {
        if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        }
      }
    }
      System.out.println("APPROVED");
  }
} Main public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int PP[] = new int[N];
    for (int i = 0;i < N;i++) {
      PP[i] = scan.nextInt();
      if (PP[i] % 2 == 0) {
        if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        }
      }
    }
      System.out.println("APPROVED");
  } main {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int PP[] = new int[N];
    for (int i = 0;i < N;i++) {
      PP[i] = scan.nextInt();
      if (PP[i] % 2 == 0) {
        if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        }
      }
    }
      System.out.println("APPROVED");
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int PP[] = new int[N]; PP new int[N] N for (int i = 0;i < N;i++) {
      PP[i] = scan.nextInt();
      if (PP[i] % 2 == 0) {
        if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        }
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      PP[i] = scan.nextInt();
      if (PP[i] % 2 == 0) {
        if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        }
      }
    } {
      PP[i] = scan.nextInt();
      if (PP[i] % 2 == 0) {
        if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        }
      }
    } PP[i] = scan.nextInt() PP[i] PP i scan.nextInt() scan.nextInt scan if (PP[i] % 2 == 0) {
        if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        }
      } PP[i] % 2 == 0 PP[i] % 2 PP[i] PP i 2 0 {
        if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        }
      } if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        } PP[i] % 3 == 0 || PP[i] % 5 == 0 PP[i] % 3 == 0 PP[i] % 3 PP[i] PP i 3 0 PP[i] % 5 == 0 PP[i] % 5 PP[i] PP 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.Scanner;
import java.util.Arrays;
class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int PP[] = new int[N];
    for (int i = 0;i < N;i++) {
      PP[i] = scan.nextInt();
      if (PP[i] % 2 == 0) {
        if (PP[i] % 3 == 0 || PP[i] % 5 == 0) {
        }
        else{
          System.out.println("DENIED");
          return;
        }
      }
    }
      System.out.println("APPROVED");
  }
}